Skip to content

Commit

Permalink
Fix branch pagination error (go-gitea#16805)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lunny committed Aug 25, 2021
1 parent 63178b5 commit d7511c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/repo/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d7511c5

Please sign in to comment.