aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaramc@gmail.com>2018-07-20 20:04:25 +0530
committerSitaram Chamarty <sitaramc@gmail.com>2018-07-22 04:16:29 +0530
commit29d5bb7a92ea0a22fa35077a5c4ca6af789ce117 (patch)
tree2d1eac8021c217321a18d10cfc5d9bb869ad0fb9
parent'info' learns '-p' option to show only physical repos (diff)
downloadgitolite-gentoo-29d5bb7a92ea0a22fa35077a5c4ca6af789ce117.tar.gz
gitolite-gentoo-29d5bb7a92ea0a22fa35077a5c4ca6af789ce117.tar.bz2
gitolite-gentoo-29d5bb7a92ea0a22fa35077a5c4ca6af789ce117.zip
VREF/NAME needs special handling in expand-deny-messages
-rwxr-xr-xsrc/triggers/expand-deny-messages12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/triggers/expand-deny-messages b/src/triggers/expand-deny-messages
index 8a0452b..107202c 100755
--- a/src/triggers/expand-deny-messages
+++ b/src/triggers/expand-deny-messages
@@ -49,10 +49,14 @@ _info( "Operation", _op( $a12, $aa, $oldsha, $newsha ) );
if ( $ref =~ m((^VREF/[^/]+)) ) {
my $vref = $1;
- my $vref_text = slurp( _which( $vref, 'x' ) );
- my $etag = '(?:help|explain|explanation)';
- $vref_text =~ m(^\s*# $etag.start\n(.*)^\s*# $etag.end\n)sm
- and print STDERR "Explanation for $vref:\n$1";
+ if ($ref =~ s(^VREF/NAME/)()) {
+ print STDERR "You're apparently not allowed to push '$ref'";
+ } else {
+ my $vref_text = slurp( _which( $vref, 'x' ) );
+ my $etag = '(?:help|explain|explanation)';
+ $vref_text =~ m(^\s*# $etag.start\n(.*)^\s*# $etag.end\n)sm
+ and print STDERR "Explanation for $vref:\n$1";
+ }
}
print STDERR "\n";