From db8dc8ca2de12a2cf67dff5a36e471a7b0547a87 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 15 Mar 2012 21:49:47 +0530 Subject: [PATCH] allow trace mode from remote client just say (for example): git push git@server:reponame.git1 for trace level 1, and similarly for 2 and 3 --- src/gitolite-shell | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gitolite-shell b/src/gitolite-shell index b596ba4..8437cbd 100755 --- a/src/gitolite-shell +++ b/src/gitolite-shell @@ -77,9 +77,10 @@ sub parse_soc { my $soc = $ENV{SSH_ORIGINAL_COMMAND}; $soc ||= 'info'; - if ( $soc =~ m(^(git-(?:upload|receive)-pack) '/?(.*?)(?:\.git)?'$) ) { + if ( $soc =~ m(^(git-(?:upload|receive)-pack) '/?(.*?)(?:\.git(\d)?)?'$) ) { # TODO git archive - my ( $verb, $repo ) = ( $1, $2 ); + my ( $verb, $repo, $trace_level ) = ( $1, $2, $3 ); + $ENV{D} = $trace_level if $trace_level; _die "invalid repo name: '$repo'" if $repo !~ $REPONAME_PATT; trace( 2, "git command", $soc ); return ( $verb, $repo );