diff options
author | Unknwon <u@gogs.io> | 2016-03-21 10:49:46 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-21 10:49:46 -0400 |
commit | 60ae8ac3d2995d46156ead8ad93004801daad4ce (patch) | |
tree | 274591915fc6d2a56067d83fdf329ff67c3270f2 /cmd | |
parent | 004fb30ebe403625b2315b284a85124611ba303b (diff) | |
download | gitea-60ae8ac3d2995d46156ead8ad93004801daad4ce.tar.gz gitea-60ae8ac3d2995d46156ead8ad93004801daad4ce.zip |
Add route for #2846
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go index b1d8b0fc84..1378cc3eca 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -520,9 +520,10 @@ func runWeb(ctx *cli.Context) { m.Get("/src/*", repo.Home) m.Get("/raw/*", repo.SingleDownload) m.Get("/commits/*", repo.RefCommits) - m.Get("/commit/*", repo.Diff) + m.Get("/commit/:sha([a-z0-9]{40})$", repo.Diff) m.Get("/forks", repo.Forks) }, context.RepoRef()) + m.Get("/commit/:sha([a-z0-9]{40})\\.:ext(patch|diff)", repo.RawDiff) m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff) }, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare) |