aboutsummaryrefslogtreecommitdiffstats
path: root/routers/routes/web.go
diff options
context:
space:
mode:
authorvnkmpf <tz@zztt.eu>2021-02-13 05:35:43 +0100
committerGitHub <noreply@github.com>2021-02-13 05:35:43 +0100
commit487f2ee41cb06f0173b8bf12bd6a78408c75fabf (patch)
treeac62859884ed23f05d6e15bbc25bea6f0b374554 /routers/routes/web.go
parenta3cc842e15eb5ed42c3125410d9c774314a286a5 (diff)
downloadgitea-487f2ee41cb06f0173b8bf12bd6a78408c75fabf.tar.gz
gitea-487f2ee41cb06f0173b8bf12bd6a78408c75fabf.zip
Whitespace in commits (#14650)
* Add whitespace to commit view * Add whitespace to /compare/a...b * Move repeated whitespaceFlags to gitdiff * Add whitespace for wiki pages
Diffstat (limited to 'routers/routes/web.go')
-rw-r--r--routers/routes/web.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/routes/web.go b/routers/routes/web.go
index 389e050376..a6af64f874 100644
--- a/routers/routes/web.go
+++ b/routers/routes/web.go
@@ -695,8 +695,8 @@ func RegisterRoutes(m *web.Route) {
m.Get("/{id}", repo.MilestoneIssuesAndPulls)
}, reqRepoIssuesOrPullsReader, context.RepoRef())
m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists).
- Get(ignSignIn, repo.SetDiffViewStyle, repo.CompareDiff).
- Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
+ Get(ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff).
+ Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.SetWhitespaceBehavior, repo.CompareAndPullRequestPost)
}, context.RepoAssignment(), context.UnitTypes())
// Grouping for those endpoints that do require authentication
@@ -885,7 +885,7 @@ func RegisterRoutes(m *web.Route) {
m.Get("/{page}", repo.Wiki)
m.Get("/_pages", repo.WikiPages)
m.Get("/{page}/_revision", repo.WikiRevision)
- m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
+ m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
m.Get("/commit/{sha:[a-f0-9]{7,40}}.{:patch|diff}", repo.RawDiff)
m.Group("", func() {
@@ -977,7 +977,7 @@ func RegisterRoutes(m *web.Route) {
m.Group("", func() {
m.Get("/graph", repo.Graph)
- m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
+ m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff)
}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader)
m.Group("/src", func() {