summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-05 22:54:20 +0100
committerGitHub <noreply@github.com>2016-11-05 22:54:20 +0100
commitf36544f98db4a210195f7d0f9019d64d9dff72f3 (patch)
tree46513d09162e3715d69a015da9cf7f225dc9c6b5 /routers
parent953c099428b152a85102f07fd2ecfe19d54ee973 (diff)
parenta0e54c0512a764ab0f93eb2ee6b978fb736190b4 (diff)
downloadgitea-f36544f98db4a210195f7d0f9019d64d9dff72f3.tar.gz
gitea-f36544f98db4a210195f7d0f9019d64d9dff72f3.zip
Merge branch 'master' into feature/goimports
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/commit.go5
-rw-r--r--routers/repo/middlewares.go2
-rw-r--r--routers/repo/pull.go10
-rw-r--r--routers/repo/view.go5
4 files changed, 1 insertions, 21 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go
index 91037fb46b..fff88380ec 100644
--- a/routers/repo/commit.go
+++ b/routers/repo/commit.go
@@ -177,11 +177,6 @@ func Diff(ctx *context.Context) {
}
}
- setEditorconfigIfExists(ctx)
- if ctx.Written() {
- return
- }
-
ctx.Data["CommitID"] = commitID
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
ctx.Data["Username"] = userName
diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go
index f35b3b7abb..2d0ebe1039 100644
--- a/routers/repo/middlewares.go
+++ b/routers/repo/middlewares.go
@@ -8,7 +8,7 @@ import (
git "github.com/gogits/git-module"
)
-func setEditorconfigIfExists(ctx *context.Context) {
+func SetEditorconfigIfExists(ctx *context.Context) {
ec, err := ctx.Repo.GetEditorconfig()
if err != nil && !git.IsErrNotExist(err) {
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index bd767b4105..c57a03153c 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -366,11 +366,6 @@ func ViewPullFiles(ctx *context.Context) {
return
}
- setEditorconfigIfExists(ctx)
- if ctx.Written() {
- return
- }
-
headTarget := path.Join(pull.HeadUserName, pull.HeadRepo.Name)
ctx.Data["IsSplitStyle"] = ctx.Query("style") == "split"
ctx.Data["Username"] = pull.HeadUserName
@@ -623,11 +618,6 @@ func CompareAndPullRequest(ctx *context.Context) {
}
}
- setEditorconfigIfExists(ctx)
- if ctx.Written() {
- return
- }
-
ctx.HTML(200, COMPARE_PULL)
}
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 385fc64441..0e082b52ea 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -243,11 +243,6 @@ func Home(ctx *context.Context) {
return
}
- setEditorconfigIfExists(ctx)
- if ctx.Written() {
- return
- }
-
var treeNames []string
paths := make([]string, 0, 5)
if len(ctx.Repo.TreePath) > 0 {