diff options
author | 2015-10-18 06:47:18 +0530 | |
---|---|---|
committer | 2015-11-01 16:48:37 +0530 | |
commit | e235299adaa2aec4bc6ad2d5f874b2c4102f631c (patch) | |
tree | 81eb5d42129aa94acd3ed2c4f1738c9d18640f1a | |
parent | fix ref-create permission bug on wild repos (diff) | |
download | gitolite-gentoo-e235299adaa2aec4bc6ad2d5f874b2c4102f631c.tar.gz gitolite-gentoo-e235299adaa2aec4bc6ad2d5f874b2c4102f631c.tar.bz2 gitolite-gentoo-e235299adaa2aec4bc6ad2d5f874b2c4102f631c.zip |
access -s: better error message for ^C on existing repo...
because "this should not happen"... happened!
(thanks to hseg on irc for catching this)
-rwxr-xr-x | src/commands/access | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commands/access b/src/commands/access index e8b9446..1b16c72 100755 --- a/src/commands/access +++ b/src/commands/access @@ -56,7 +56,7 @@ if ( $repo ne '%' and $user ne '%' ) { # single repo, single user; no STDIN $ret = access( $repo, $user, $aa, $ref ); - show() if $s; + show($ret) if $s; if ( $ret =~ /DENIED/ ) { print "$ret\n" unless $q; @@ -81,7 +81,10 @@ while (<>) { } sub show { - my $in = $rc{RULE_TRACE} or die "this should not happen!"; + my $ret = shift; + die "repo already exists; ^C won't work\n" if $ret =~ /DENIED by existence/; + + my $in = $rc{RULE_TRACE} or die "this should not happen! $ret"; print STDERR "legend:"; print STDERR " |