summaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2022-09-14 20:54:30 +0200
committerGitHub <noreply@github.com>2022-09-14 20:54:30 +0200
commitcad8f1b1fe77f40f4b59dac14b926b71a18a3354 (patch)
tree07356004031e9662dc0d732382f71eea7a12f4d6 /routers/web/repo
parent0ba2f53ca1348ae2facc144ea932a89d8ab52f19 (diff)
downloadgitea-cad8f1b1fe77f40f4b59dac14b926b71a18a3354.tar.gz
gitea-cad8f1b1fe77f40f4b59dac14b926b71a18a3354.zip
Use correct branch for .editorconfig error (#21152)
In #21088 I accidentally forgot to support multiple branches. It always checks the default branch, no matter on which branch you are working on. With this fix, it always shows the error from the current branch. Sorry for that.
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index 65c8ab92cf..768a30ec21 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -375,7 +375,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
ctx.Data["RawFileLink"] = rawLink + "/" + util.PathEscapeSegments(ctx.Repo.TreePath)
if ctx.Repo.TreePath == ".editorconfig" {
- _, editorconfigErr := ctx.Repo.GetEditorconfig()
+ _, editorconfigErr := ctx.Repo.GetEditorconfig(ctx.Repo.Commit)
ctx.Data["FileError"] = editorconfigErr
}