summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/wiki.go
diff options
context:
space:
mode:
authorMatthew Walowski <mattwalowski@gmail.com>2023-05-08 00:10:53 -0700
committerGitHub <noreply@github.com>2023-05-08 07:10:53 +0000
commitff5629268c5c01d3f460570baa571baef3f896cd (patch)
treed0e85b7ca946b93bc7d74d30436aabcebb59dc27 /routers/api/v1/repo/wiki.go
parente962ade99cfd0471273f3dcf956c7cd222472758 (diff)
downloadgitea-ff5629268c5c01d3f460570baa571baef3f896cd.tar.gz
gitea-ff5629268c5c01d3f460570baa571baef3f896cd.zip
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
Diffstat (limited to 'routers/api/v1/repo/wiki.go')
-rw-r--r--routers/api/v1/repo/wiki.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/api/v1/repo/wiki.go b/routers/api/v1/repo/wiki.go
index 0b9a36ec47..e33790a378 100644
--- a/routers/api/v1/repo/wiki.go
+++ b/routers/api/v1/repo/wiki.go
@@ -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