summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-11-13 00:54:04 -0200
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-13 10:54:04 +0800
commit739f07c98e1254f776a7cb943a3430de32b17d1d (patch)
tree5ba37863a5b2f3188413dc9267d57c63cdb744ff /cmd/web.go
parentbd76e156bb08424841ff992aaffcc5aef913b703 (diff)
downloadgitea-739f07c98e1254f776a7cb943a3430de32b17d1d.tar.gz
gitea-739f07c98e1254f776a7cb943a3430de32b17d1d.zip
Remember diff view style (#163)
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 9f45e1a7ff..8cd3949be1 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -584,7 +584,7 @@ func runWeb(ctx *cli.Context) error {
m.Group("/pulls/:index", func() {
m.Get("/commits", context.RepoRef(), repo.ViewPullCommits)
- m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.ViewPullFiles)
+ m.Get("/files", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ViewPullFiles)
m.Post("/merge", reqRepoWriter, repo.MergePullRequest)
}, repo.MustAllowPulls)
@@ -592,12 +592,12 @@ func runWeb(ctx *cli.Context) error {
m.Get("/src/*", repo.SetEditorconfigIfExists, repo.Home)
m.Get("/raw/*", repo.SingleDownload)
m.Get("/commits/*", repo.RefCommits)
- m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.Diff)
+ m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff)
m.Get("/forks", repo.Forks)
}, context.RepoRef())
m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff)
- m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff)
+ m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff)
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars)