stick to regex metas that come with perl 5.8
we have a stated aim to work with any perl that git is happy with, which means it should work with perl 5.8. At least :)
This commit is contained in:
parent
74726fdc31
commit
c1b27eae22
|
@ -369,8 +369,8 @@ sub new_repo
|
||||||
# you add CAT => @all to the hash. similarly, if gl-perms has
|
# you add CAT => @all to the hash. similarly, if gl-perms has
|
||||||
# "DOG bar foo baz", you add DOG => foo to the hash. And
|
# "DOG bar foo baz", you add DOG => foo to the hash. And
|
||||||
# since specific perms must override @all, we do @all first.
|
# since specific perms must override @all, we do @all first.
|
||||||
$perm_cats{$1} = '@all' while ($perms =~ /^\h*(\S+)(?=\h).*\h\@all(\h|$)/mg);
|
$perm_cats{$1} = '@all' while ($perms =~ /^[ \t]*(\S+)(?=[ \t]).*[ \t]\@all([ \t]|$)/mg);
|
||||||
$perm_cats{$1} = $user while ($perms =~ /^\h*(\S+)(?=\h).*\h$user(\h|$)/mg);
|
$perm_cats{$1} = $user while ($perms =~ /^[ \t]*(\S+)(?=[ \t]).*[ \t]$user([ \t]|$)/mg);
|
||||||
# validate the categories being sent back
|
# validate the categories being sent back
|
||||||
for (sort keys %perm_cats) {
|
for (sort keys %perm_cats) {
|
||||||
die "invalid permission category $_\n" unless $GL_WILDREPOS_PERM_CATS =~ /(^|\s)$_(\s|$)/;
|
die "invalid permission category $_\n" unless $GL_WILDREPOS_PERM_CATS =~ /(^|\s)$_(\s|$)/;
|
||||||
|
|
Loading…
Reference in a new issue