From: Vincent Pit Date: Sat, 6 Dec 2008 15:00:31 +0000 (+0100) Subject: Under -D, print the command and the working directory before actually running it X-Git-Tag: v0.06~11 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=86c58db021c8508af677da9c11351f7591f3cd22;p=perl%2Fmodules%2Frgit.git Under -D, print the command and the working directory before actually running it --- diff --git a/lib/App/Rgit/Repository.pm b/lib/App/Rgit/Repository.pm index 9b39734..b4c11b6 100644 --- a/lib/App/Rgit/Repository.pm +++ b/lib/App/Rgit/Repository.pm @@ -135,10 +135,12 @@ sub run { unless ($self->fake) { s/\^($e)/$escapes{$1}->($self, $conf)/eg for @args; } + unshift @args, $conf->git; + $conf->info('Executing "', join(' ', @args), '" into ', $self->work, "\n"); { local $ENV{GIT_DIR} = $self->repo if exists $ENV{GIT_DIR}; local $ENV{GIT_EXEC_PATH} = $conf->git if exists $ENV{GIT_EXEC_PATH}; - system { $conf->git } $conf->git, @args; + system { $args[0] } @args; } if ($? == -1) { $conf->crit("Failed to execute git: $!\n");