We can use popen_rd to pass command and callbacks to a
callback sub. This is another step which may allow us
to get rid of the wantarray forms of popen_rd/popen_wr
in the future.
---
lib/PublicInbox/CodeSearchIdx.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm
index c8e4c591..122bd4d4 100644
--- a/lib/PublicInbox/CodeSearchIdx.pm
+++ b/lib/PublicInbox/CodeSearchIdx.pm
@@ -266,9 +266,9 @@ sub shard_index { # via wq_io_do in IDX_SHARDS
my $in = delete($self->{0}) // die 'BUG: no {0} input';
my $op_p = delete($self->{1}) // die 'BUG: no {1} op_p';
sysseek($in, 0, SEEK_SET);
- my ($rd, $pid) = $git->popen(@LOG_STDIN, undef, { 0 => $in });
+ my $rd = popen_rd($git->cmd(@LOG_STDIN), undef, { 0 => $in },
+ \&cidx_reap_log, $self, $op_p);
close $in;
- awaitpid($pid, \&cidx_reap_log, $self, $op_p);
PublicInbox::CidxLogP->new($rd, $self, $git, $roots);
# CidxLogP->event_step will call cidx_read_log_p once there's input
}