summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/triggers/expand-deny-messages')
-rwxr-xr-xsrc/triggers/expand-deny-messages14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/triggers/expand-deny-messages b/src/triggers/expand-deny-messages
index a8b2289..107202c 100755
--- a/src/triggers/expand-deny-messages
+++ b/src/triggers/expand-deny-messages
@@ -2,6 +2,8 @@
use strict;
use warnings;
+$|++;
+
# program name: expand-deny-messages
# DOCUMENTATION IS AT THE BOTTOM OF THIS FILE; PLEASE READ
@@ -47,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";