compile/update-hook: preserve the order of refs
...by turning the last piece (list of allowed refs) into an array rather than a hash
This commit is contained in:
parent
6feffc9b16
commit
3cddc4ca35
|
@ -204,10 +204,7 @@ while (<INF>)
|
|||
{
|
||||
for my $user (@users)
|
||||
{
|
||||
for my $ref (@refs)
|
||||
{
|
||||
$repos{$repo}{$perm}{$user}{$ref} = 1;
|
||||
}
|
||||
push @{ $repos{$repo}{$perm}{$user} }, @refs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ $perm = '+' if $ref =~ m(refs/tags/) and $oldsha ne ('0' x 40);
|
|||
$perm = '+' if $ref =~ m(refs/heads/) and $oldsha ne $merge_base;
|
||||
|
||||
my $allowed_refs = $repos{$ENV{GL_REPO}}{$perm}{$ENV{GL_USER}};
|
||||
for my $refex (keys %$allowed_refs)
|
||||
for my $refex (@$allowed_refs)
|
||||
# refex? sure -- a regex to match a ref against :)
|
||||
{
|
||||
if ($ref =~ /$refex/)
|
||||
|
|
Loading…
Reference in a new issue