From 1d951cfc4915d9beb12b9e2e9fcd178069e4ce02 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 1 Feb 2017 10:21:03 -0200 Subject: Fix 500 when repo has invalid .editorconfig (#3758) Creating a notice instead Fixes #3643 --- routers/repo/commit.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'routers/repo/commit.go') 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" -- cgit v1.2.3