From 14248a34415fea678a16e1212f71bbe0db213974 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 22 Jun 2010 15:11:50 +0000 Subject: [PATCH] add '[' as allowed starting character for repo patterns this allows the first part of the repo name (if wildcard repos are activated) to have a regex like [a-zA-Z0-9]+. ---- Note added by committer: he assumption used to be that all wildcard repos will have some common prefix like "users", but I did not imagine it would be like repo [a-zA-Z0-9]+/users/CREATOR/[a-zA-Z0-9]+ (viz., the "users" is in the middle). Sounds reasonable... --- src/gitolite.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gitolite.pm b/src/gitolite.pm index 4f6d3c9..f432074 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -33,8 +33,8 @@ our $W_COMMANDS=qr/^git[ -]receive-pack$/; # because in this version, a repo can have "CREATOR" in the name (see docs) our $REPONAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@/+-]*$); # very simple pattern our $USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._\@+-]*$); # very simple pattern -# same as REPONAME, plus some common regex metas -our $REPOPATT_PATT=qr(^\@?[0-9a-zA-Z][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$); +# same as REPONAME, but used for wildcard repos, allows some common regex metas +our $REPOPATT_PATT=qr(^\@?[0-9a-zA-Z[][\\^.$|()[\]*+?{}0-9a-zA-Z._\@/-]*$); # these come from the RC file our ($REPO_UMASK, $GL_WILDREPOS, $GL_PACKAGE_CONF, $GL_PACKAGE_HOOKS, $REPO_BASE, $GL_CONF_COMPILED, $GL_BIG_CONFIG);