about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepobrowseGitPatch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitPatch.pm')
-rw-r--r--lib/PublicInbox/RepobrowseGitPatch.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/RepobrowseGitPatch.pm b/lib/PublicInbox/RepobrowseGitPatch.pm
index dc6cd793..5ae768e8 100644
--- a/lib/PublicInbox/RepobrowseGitPatch.pm
+++ b/lib/PublicInbox/RepobrowseGitPatch.pm
@@ -24,12 +24,11 @@ sub call_git_patch {
         # limit scope, don't take extra args to avoid wasting server
         # resources buffering:
         my $range = "$id~1..$id^0";
-        my @cmd = ('git', "--git-dir=$git->{git_dir}", @CMD,
-                        $sig." $range", $range, '--');
+        my $cmd = $git->cmd(@CMD, $sig." $range", $range, '--');
         my $expath = $req->{expath};
-        push @cmd, $expath if $expath ne '';
+        push @$cmd, $expath if $expath ne '';
 
-        my $qsp = PublicInbox::Qspawn->new(\@cmd);
+        my $qsp = PublicInbox::Qspawn->new($cmd);
         $qsp->psgi_return($env, undef, sub {
                 my ($r) = @_;
                 my $h = ['Content-Type', 'text/plain; charset=UTF-8'];