mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Pass 'not' to commit count (#24473)
Due to #24409 , we can now specify '--not' when getting all commits from a repo to exclude commits from a different branch. When I wrote that PR, I forgot to also update the code that counts the number of commits in the repo. So now, if the --not option is used, it may return too many commits, which can indicate that another page of data is available when it is not. This PR passes --not to the commands that count the number of commits in a repo
This commit is contained in:
@@ -429,7 +429,12 @@ func ListPageRevisions(ctx *context.APIContext) {
|
||||
}
|
||||
|
||||
// get Commit Count
|
||||
commitsHistory, err := wikiRepo.CommitsByFileAndRange("master", pageFilename, page)
|
||||
commitsHistory, err := wikiRepo.CommitsByFileAndRange(
|
||||
git.CommitsByFileAndRangeOptions{
|
||||
Revision: "master",
|
||||
File: pageFilename,
|
||||
Page: page,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "CommitsByFileAndRange", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user