Skip to content

Commit 4e761fa

Browse files
authored
Fix branch pagination error (#16805)
Fix #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 efaf109 commit 4e761fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/branch.go

Lines changed: 1 addition & 1 deletion
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)