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
This commit is contained in:
parent
38cb9bfda9
commit
db8dc8ca2d
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue