aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorThibault Meyer <0xbaadf00d@users.noreply.github.com>2016-12-22 01:46:43 +0100
committer无闻 <u@gogs.io>2016-12-21 19:46:43 -0500
commit93616fe77657b69870028065d6dd2f5d337e6130 (patch)
tree21437ae819f32baefa2499f8c2c445bc855148c7 /cmd
parente5972bbcdea957dc9baf5ed55b0f094d9f30142e (diff)
Fix regex on route file (#3851)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 4a3a5cd0..24a21657 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -586,12 +586,12 @@ func runWeb(ctx *cli.Context) error {
m.Get("/src/*", repo.Home)
m.Get("/raw/*", repo.SingleDownload)
m.Get("/commits/*", repo.RefCommits)
- m.Get("/commit/:sha([a-z0-9]{7,40})$", repo.Diff)
+ m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.Diff)
m.Get("/forks", repo.Forks)
}, context.RepoRef())
- m.Get("/commit/:sha([a-z0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff)
+ m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff)
- m.Get("/compare/:before([a-z0-9]{7,40})\\.\\.\\.:after([a-z0-9]{7,40})", repo.CompareDiff)
+ m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.CompareDiff)
}, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare)
m.Group("/:username/:reponame", func() {
m.Get("/stars", repo.Stars)