diff --git a/gl-compile-conf b/gl-compile-conf index 6aefe0c..8379fa5 100755 --- a/gl-compile-conf +++ b/gl-compile-conf @@ -204,10 +204,7 @@ while () { for my $user (@users) { - for my $ref (@refs) - { - $repos{$repo}{$perm}{$user}{$ref} = 1; - } + push @{ $repos{$repo}{$perm}{$user} }, @refs; } } } diff --git a/update-hook.pl b/update-hook.pl index 53540e9..b881f5a 100755 --- a/update-hook.pl +++ b/update-hook.pl @@ -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/)