From 58a4407acb04b329e94e92977b1414feb309d5de Mon Sep 17 00:00:00 2001 From: zeripath Date: Mon, 15 Aug 2022 02:22:13 +0100 Subject: Remove follow from commits by file (#20765) The use of `--follow` makes getting these commits very slow on large repositories as it results in searching the whole commit tree for a blob. Now as nice as the results of `--follow` are, I am uncertain whether it is really of sufficient importance to keep around. Fix #20764 Signed-off-by: Andrew Thornton Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- routers/web/repo/wiki.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routers/web/repo/wiki.go') diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go index 1af511f50a..4cd5856ea6 100644 --- a/routers/web/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -360,12 +360,12 @@ func renderRevisionPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) } // get Commit Count - commitsHistory, err := wikiRepo.CommitsByFileAndRangeNoFollow("master", pageFilename, page) + commitsHistory, err := wikiRepo.CommitsByFileAndRange("master", pageFilename, page) if err != nil { if wikiRepo != nil { wikiRepo.Close() } - ctx.ServerError("CommitsByFileAndRangeNoFollow", err) + ctx.ServerError("CommitsByFileAndRange", err) return nil, nil } ctx.Data["Commits"] = git_model.ConvertFromGitCommit(commitsHistory, ctx.Repo.Repository) -- cgit v1.2.3