]> git.vpit.fr Git - perl/modules/rgit.git/commitdiff
Specialize GIT_DIR and GIT_EXEC_PATH for each repo if they were set when calling...
authorVincent Pit <vince@profvince.com>
Tue, 7 Oct 2008 20:44:10 +0000 (22:44 +0200)
committerVincent Pit <vince@profvince.com>
Tue, 7 Oct 2008 20:44:10 +0000 (22:44 +0200)
lib/App/Rgit/Repository.pm

index 50cc9d015ff9dd6585f3499274582ed5e27be26d..f5c01b57fddcf62ea270b1639bced920284049a5 100644 (file)
@@ -129,7 +129,11 @@ sub run {
   );
   s/\^([\^ngGwWbBR])/$escapes{$1}->()/eg for @args;
  }
- system { $conf->git } $conf->git, @args;
+ {
+  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;
+ }
  if ($? == -1) {
   warn "Failed to execute git: $!\n";
   return;