diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-08-25 06:15:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 23:15:07 +0100 |
commit | 4e761fa38584d3d9f9a607bcee806fc24d142277 (patch) | |
tree | f25fc48c73530ab1f7511a1501492915776e35dd /routers | |
parent | efaf109435172994763fa1799708628f0500ea6e (diff) | |
download | gitea-4e761fa38584d3d9f9a607bcee806fc24d142277.tar.gz gitea-4e761fa38584d3d9f9a607bcee806fc24d142277.zip |
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.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go index 84c3864669..32cfc2adff 100644 --- a/routers/web/repo/branch.go +++ b/routers/web/repo/branch.go @@ -217,7 +217,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) { branches = append(branches, deletedBranches...) } - return branches, totalNumOfBranches - 1 + return branches, totalNumOfBranches } func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch, |