mirror of
https://github.com/go-gitea/gitea
synced 2025-08-29 12:58:29 +00:00
Fix various bugs (#35177)
* Fix #35144 * Fix #35117 * Fix https://github.com/go-gitea/gitea/issues/35054#issuecomment-3131793977 * Fix #35136
This commit is contained in:
@@ -90,11 +90,8 @@ func GetTreeBySHA(ctx context.Context, repo *repo_model.Repository, gitRepo *git
|
||||
if rangeStart >= len(entries) {
|
||||
return tree, nil
|
||||
}
|
||||
var rangeEnd int
|
||||
if len(entries) > perPage {
|
||||
tree.Truncated = true
|
||||
}
|
||||
rangeEnd = min(rangeStart+perPage, len(entries))
|
||||
rangeEnd := min(rangeStart+perPage, len(entries))
|
||||
tree.Truncated = rangeEnd < len(entries)
|
||||
tree.Entries = make([]api.GitEntry, rangeEnd-rangeStart)
|
||||
for e := rangeStart; e < rangeEnd; e++ {
|
||||
i := e - rangeStart
|
||||
|
Reference in New Issue
Block a user