Skip to content

Commit ab7e36e

Browse files
authored
Fix branch pagination error (#16805) (#16816)
Backport #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 63178b5 commit ab7e36e

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)