diff --git a/src/gitolite-shell b/src/gitolite-shell index 2ae512b..71858cb 100755 --- a/src/gitolite-shell +++ b/src/gitolite-shell @@ -34,8 +34,10 @@ exit 0; # XXX lots of stuff from gl-auth-command is missing for now... sub in_local { - print STDERR "TRACE: gsh(", join( ")(", @ARGV ), ")\n"; - print STDERR "TRACE: gsh(SOC=$ENV{SSH_ORIGINAL_COMMAND})\n"; + if ($ENV{SSH_ORIGINAL_COMMAND} =~ /git-\w+-pack/) { + print STDERR "TRACE: gsh(", join( ")(", @ARGV ), ")\n"; + print STDERR "TRACE: gsh(SOC=$ENV{SSH_ORIGINAL_COMMAND})\n"; + } } sub in_http { diff --git a/t/glt b/t/glt index 09d4429..b1cf4fe 100755 --- a/t/glt +++ b/t/glt @@ -5,19 +5,24 @@ use warnings; use FindBin; BEGIN { $ENV{GL_BINDIR} = $FindBin::RealBin; } -print STDERR "TRACE: glt(", join( ")(", @ARGV ), ")\n"; - my $cmd = shift or die "need command"; my $user = shift or die "need user"; my $rc; +my %extcmds = ( + info => 1, + perms => 1, +); + $ENV{G3T_USER} = $user; -if ($cmd eq 'info' ) { - $ENV{SSH_ORIGINAL_COMMAND} = $cmd; +if ($extcmds{$cmd}) { + $ENV{SSH_ORIGINAL_COMMAND} = join(" ", $cmd, @ARGV); exec( "$ENV{GL_BINDIR}/../src/gitolite-shell", $user ); } elsif ( $cmd eq 'push' ) { + print STDERR "TRACE: glt(", join( ")(", @ARGV ), ")\n"; $rc = system( "git", $cmd, "--receive-pack=$ENV{GL_BINDIR}/gitolite-receive-pack", @ARGV ); } else { + print STDERR "TRACE: glt(", join( ")(", @ARGV ), ")\n"; $rc = system( "git", $cmd, "--upload-pack=$ENV{GL_BINDIR}/gitolite-upload-pack", @ARGV ); } diff --git a/t/info.t b/t/info.t index 7171fbb..22019e3 100755 --- a/t/info.t +++ b/t/info.t @@ -6,7 +6,7 @@ use warnings; use lib "src"; use Gitolite::Test; -try 'plan 45'; +try 'plan 39'; try "## info"; @@ -30,32 +30,26 @@ try " /Initialized.*empty.*t3.git/ "; try " - glt info u1; ok; gsh - /R W \t\@t1/ + glt info u1; ok; /R W \t\@t1/ /R W \tt1/ /R \tt2/ !/t3/ /R W \ttesting/ - glt info u2; ok; gsh - /R \t\@t1/ + glt info u2; ok; /R \t\@t1/ /R \tt1/ /R W \tt2/ !/t3/ /R W \ttesting/ - glt info u3; ok; gsh - /R W \tt3/ + glt info u3; ok; /R W \tt3/ !/\@t1/ !/t[12]/ /R W \ttesting/ - glt info u4; ok; gsh - /R \tt3/ + glt info u4; ok; /R \tt3/ !/\@t1/ !/t[12]/ /R W \ttesting/ - glt info u5; ok; gsh - !/t[123]/ + glt info u5; ok; !/t[123]/ /R W \ttesting/ - glt info u6; ok; gsh - !/t[123]/ + glt info u6; ok; !/t[123]/ /R W \ttesting/ " or die;