aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/feed/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/feed/file.go')
-rw-r--r--routers/web/feed/file.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/web/feed/file.go b/routers/web/feed/file.go
index 6a8d0c454d..56a9c54ddc 100644
--- a/routers/web/feed/file.go
+++ b/routers/web/feed/file.go
@@ -10,6 +10,7 @@ import (
"code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/context"
+ "code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/util"
"github.com/gorilla/feeds"
@@ -21,7 +22,12 @@ func ShowFileFeed(ctx *context.Context, repo *repo.Repository, formatType string
if len(fileName) == 0 {
return
}
- commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(ctx.Repo.RefName, fileName, 1)
+ commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(
+ git.CommitsByFileAndRangeOptions{
+ Revision: ctx.Repo.RefName,
+ File: fileName,
+ Page: 1,
+ })
if err != nil {
ctx.ServerError("ShowBranchFeed", err)
return