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]
|
* one user account on the server, with password access [2]
|
||||||
|
|
||||||
A major objective is to allow use by people without root access, permissions
|
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,
|
to create other userids, etc. Even if you have root, please add a user just
|
||||||
but go add a user just for gitolite and do all this from that user. Really.
|
for gitolite and do all this from that user.
|
||||||
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.
|
|
||||||
|
|
||||||
### quick install
|
### quick install
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,9 @@ chomp($merge_base = `git merge-base $oldsha $newsha`)
|
||||||
my $perm = 'W';
|
my $perm = 'W';
|
||||||
# rewriting a tag is considered a rewind, in terms of permissions
|
# rewriting a tag is considered a rewind, in terms of permissions
|
||||||
$perm = '+' if $ref =~ m(refs/tags/) and $oldsha ne ('0' x 40);
|
$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
|
# non-ff push to ref
|
||||||
# should
|
# notice that ref delete looks like a rewind, as it should
|
||||||
$perm = '+' if $ref =~ m(refs/heads/) and $oldsha ne $merge_base;
|
$perm = '+' if $oldsha ne $merge_base;
|
||||||
|
|
||||||
my @allowed_refs;
|
my @allowed_refs;
|
||||||
push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}} || [] };
|
push @allowed_refs, @ { $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}} || [] };
|
||||||
|
|
Loading…
Reference in a new issue