diff options
author | Thibault Meyer <meyer.thibault@gmail.com> | 2016-11-03 09:32:55 +0100 |
---|---|---|
committer | Thibault Meyer <meyer.thibault@gmail.com> | 2016-11-03 09:32:55 +0100 |
commit | a79eb48de30ae72ebc6183e7bef5fd7012d4b5a0 (patch) | |
tree | 9a8d544399b5c505bbd82f293edb61cb10970947 /cmd | |
parent | 6bcff7828f117af8d51285ce3acba01a7e40a867 (diff) | |
download | gitea-a79eb48de30ae72ebc6183e7bef5fd7012d4b5a0.tar.gz gitea-a79eb48de30ae72ebc6183e7bef5fd7012d4b5a0.zip |
Fix SHA regexp and commit comparisons
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go index 97f6a0f15c..b335b0cbca 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -99,7 +99,7 @@ func checkVersion() { for _, c := range checkers { if !version.Compare(c.Version(), c.Expected, ">=") { log.Fatal(4, `Dependency outdated! -Package '%s' current version (%s) is below requirement (%s), +Package '%s' current version (%s) is below requirement (%s), please use following command to update this package and recompile Gogs: go get -u %[1]s`, c.ImportPath, c.Version(), c.Expected) } @@ -585,12 +585,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) |