about summary refs log tree commit homepage
path: root/lib/PublicInbox/SolverGit.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-19 08:13:11 +0000
committerEric Wong <e@80x24.org>2019-01-20 04:24:54 +0000
commit8e7ce7fb5220a74dc17c07e8dce931d53d1b2c24 (patch)
tree0a78b570580d50825b5df6234b1283a79b5d76d3 /lib/PublicInbox/SolverGit.pm
parente0cfec6266998b981f5b47bb3e35bb1a221fb019 (diff)
downloadpublic-inbox-8e7ce7fb5220a74dc17c07e8dce931d53d1b2c24.tar.gz
It's not likely to be worth our time to support
a callback-driven model for something which happens
once per patch series.
Diffstat (limited to 'lib/PublicInbox/SolverGit.pm')
-rw-r--r--lib/PublicInbox/SolverGit.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm
index 51be2cdf..42bb6033 100644
--- a/lib/PublicInbox/SolverGit.pm
+++ b/lib/PublicInbox/SolverGit.pm
@@ -221,11 +221,13 @@ sub prepare_index ($$$$) {
         my ($r, $w);
         my $path_a = $di->{path_a} or die "BUG: path_a missing for $oid_full";
         my $mode_a = $di->{mode_a} || extract_old_mode($di);
-        my @git = (qw(git -C), $wt_dir);
 
+        # unlike git-apply(1), this only gets called once in a patch
+        # series and happens too quickly to be worth making async:
         pipe($r, $w) or die "pipe: $!";
         my $rdr = { 0 => fileno($r) };
-        my $pid = spawn([@git, qw(update-index -z --index-info)], {}, $rdr);
+        my $pid = spawn([qw(git -C), $wt_dir,
+                         qw(update-index -z --index-info)], undef, $rdr);
         close $r or die "close pipe(r): $!";
         print $w "$mode_a $oid_full\t$path_a\0" or die "print update-index: $!";