]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchIdx.pm
spawn (and thus popen_rd) die on failure
[public-inbox.git] / lib / PublicInbox / SearchIdx.pm
index ca1457fd437d3022f0733ce7e908c0d27e6e0786..cb5549125c4c0fdc0f5ab2b50e55e081ecf692e2 100644 (file)
@@ -12,7 +12,7 @@ use warnings;
 use base qw(PublicInbox::Search PublicInbox::Lock);
 use PublicInbox::MIME;
 use PublicInbox::InboxWritable;
-use PublicInbox::MID qw/mid_clean id_compress mid_mime mids_for_index/;
+use PublicInbox::MID qw/mid_clean mid_mime mids_for_index/;
 use PublicInbox::MsgIter;
 use Carp qw(croak);
 use POSIX qw(strftime);
@@ -433,7 +433,7 @@ sub remove_message {
                batch_do($self, 'Q' . $mid, sub {
                        my ($ids) = @_;
                        $db->delete_document($_) for @$ids;
-                       $nr = scalar @$ids;
+                       $nr += scalar @$ids;
                });
        };
        if ($@) {
@@ -666,7 +666,6 @@ sub is_ancestor ($$$) {
        my $cmd = [ 'git', "--git-dir=$git->{git_dir}",
                qw(merge-base --is-ancestor), $cur, $tip ];
        my $pid = spawn($cmd);
-       defined $pid or die "spawning ".join(' ', @$cmd)." failed: $!";
        waitpid($pid, 0) == $pid or die join(' ', @$cmd) .' did not finish';
        $? == 0;
 }