diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-02-01 10:21:03 -0200 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2017-02-01 07:21:03 -0500 |
commit | 1d951cfc4915d9beb12b9e2e9fcd178069e4ce02 (patch) | |
tree | 4771d054576b5265e3c137c152d0ba472f933768 /routers/repo/commit.go | |
parent | 32a0255ce3641bdad7c654cf9677115b6ef31759 (diff) |
Fix 500 when repo has invalid .editorconfig (#3758)
Creating a notice instead
Fixes #3643
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index b9ced49e..455f02cf 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -179,12 +179,10 @@ func Diff(ctx *context.Context) { } } - ec, err := ctx.Repo.GetEditorconfig() - if err != nil && !git.IsErrNotExist(err) { - ctx.Handle(500, "ErrGettingEditorconfig", err) + setEditorconfigIfExists(ctx) + if ctx.Written() { return } - ctx.Data["Editorconfig"] = ec ctx.Data["CommitID"] = commitID ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split" |