Skip to content

Commit d7511c5

Browse files
committed
Fix branch pagination error (go-gitea#16805)
Fix go-gitea#16801 Even if default branch is removed from the current page, but the total branches number should be still kept. So that the pagination calculation will be correct.
1 parent 63178b5 commit d7511c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/branch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) {
217217
branches = append(branches, deletedBranches...)
218218
}
219219

220-
return branches, totalNumOfBranches - 1
220+
return branches, totalNumOfBranches
221221
}
222222

223223
func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch,

0 commit comments

Comments
 (0)