update: disallow old-style personal branches

The downside is that the repo config does need to be edited and new
style line(s) added.
This commit is contained in:
Sitaram Chamarty 2010-03-16 10:38:00 +05:30
parent 2456cc17c8
commit 33d6856f4b

View file

@ -25,7 +25,7 @@ use warnings;
# common definitions # common definitions
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
our ($GL_CONF_COMPILED, $PERSONAL); our ($GL_CONF_COMPILED);
our %repos; our %repos;
# we should already have the GL_RC env var set when we enter this hook # we should already have the GL_RC env var set when we enter this hook
@ -76,8 +76,6 @@ $perm = '+' if $ref =~ m(refs/tags/) and $oldsha ne ('0' x 40);
$perm = '+' if $oldsha ne $merge_base; $perm = '+' if $oldsha ne $merge_base;
my @allowed_refs; my @allowed_refs;
# personal stuff -- right at the start in the new regime, I guess!
push @allowed_refs, { "$PERSONAL/$ENV{GL_USER}/" => "RW+" } if $PERSONAL;
# we want specific perms to override @all, so they come first # we want specific perms to override @all, so they come first
push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$ENV{GL_USER}} || [] }; push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$ENV{GL_USER}} || [] };
push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{'@all'} || [] }; push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{'@all'} || [] };