update hook: using non-std branches revealed an unnecessary check for refs/heads/; removed
This commit is contained in:
parent
e55fc3b7f3
commit
b916a07d28
|
@ -10,12 +10,8 @@ If you managed to install git, you might already have what gitolite needs:
|
|||
* one user account on the server, with password access [2]
|
||||
|
||||
A major objective is to allow use by people without root access, permissions
|
||||
to create other userids, etc. If you have root, congratulations and all that,
|
||||
but go add a user just for gitolite and do all this from that user. Really.
|
||||
I see no earthly reason for this to run as root.
|
||||
|
||||
And don't bug me about wanting to install it in `/opt` or whatever if you
|
||||
haven't the time to read the docs or change a path in a config file.
|
||||
to create other userids, etc. Even if you have root, please add a user just
|
||||
for gitolite and do all this from that user.
|
||||
|
||||
### quick install
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ chomp($merge_base = `git merge-base $oldsha $newsha`)
|
|||
my $perm = 'W';
|
||||
# rewriting a tag is considered a rewind, in terms of permissions
|
||||
$perm = '+' if $ref =~ m(refs/tags/) and $oldsha ne ('0' x 40);
|
||||
# non-ff push to branch. Notice that branch delete looks like a rewind, as it
|
||||
# should
|
||||
$perm = '+' if $ref =~ m(refs/heads/) and $oldsha ne $merge_base;
|
||||
# non-ff push to ref
|
||||
# notice that ref delete looks like a rewind, as it should
|
||||
$perm = '+' if $oldsha ne $merge_base;
|
||||
|
||||
my @allowed_refs;
|
||||
push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}} || [] };
|
||||
|
|
Loading…
Reference in a new issue