Skip to content

Commit cad8f1b

Browse files
authored
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.
1 parent 0ba2f53 commit cad8f1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/repo/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
375375
ctx.Data["RawFileLink"] = rawLink + "/" + util.PathEscapeSegments(ctx.Repo.TreePath)
376376

377377
if ctx.Repo.TreePath == ".editorconfig" {
378-
_, editorconfigErr := ctx.Repo.GetEditorconfig()
378+
_, editorconfigErr := ctx.Repo.GetEditorconfig(ctx.Repo.Commit)
379379
ctx.Data["FileError"] = editorconfigErr
380380
}
381381

0 commit comments

Comments
 (0)