route: commit: match only hexadecimal rather than digits + full alphabet

A human-readable representation of a Git SHA1 commit ID is composed
only of hexadecimal digits, thus there is no need to match against
the full alphabet.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This commit is contained in:
Eric Sunshine 2014-12-31 04:50:07 -05:00 committed by Alberto Bertogli
parent 420afd3206
commit aaf2968538

@ -217,7 +217,7 @@ def summary(repo):
def branch(repo, bname, offset = 0):
return dict(repo = repo.new_in_branch(bname), offset = offset)
@bottle.route('/r/<repo:repo>/c/<cid:re:[0-9a-z]{5,40}>/')
@bottle.route('/r/<repo:repo>/c/<cid:re:[0-9a-f]{5,40}>/')
@bottle.view('commit')
@with_utils
def commit(repo, cid):