]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
cleanup: use '$ibx' consistently when referring to Inbox refs
[public-inbox.git] / lib / PublicInbox / Import.pm
index fd4255cf867d6ca1a40dcce1fe19265f536803e6..fc4e72dc93ea0ce978a93f5224c74e5b8178acc3 100644 (file)
@@ -178,8 +178,8 @@ sub _update_git_info ($$) {
        run_die([@cmd, 'update-server-info'], undef);
        ($self->{path_type} eq '2/38') and eval {
                require PublicInbox::SearchIdx;
-               my $inbox = $self->{inbox} || $git_dir;
-               my $s = PublicInbox::SearchIdx->new($inbox);
+               my $ibx = $self->{inbox} || $git_dir;
+               my $s = PublicInbox::SearchIdx->new($ibx);
                $s->index_sync({ ref => $self->{ref} });
        };
        eval { run_die([@cmd, qw(gc --auto)], undef) } if $do_gc;
@@ -495,7 +495,7 @@ sub purge_oids {
        my $old = $self->{'ref'};
        my $git = $self->{git};
        my @export = (qw(fast-export --no-data --use-done-feature), $old);
-       my ($rd, $pid) = $git->popen(@export);
+       my $rd = $git->popen(@export);
        my ($r, $w) = $self->gfi_start;
        my @buf;
        my $npurge = 0;
@@ -550,6 +550,7 @@ sub purge_oids {
                        push @buf, $_;
                }
        }
+       close $rd or die "close fast-export failed: $?";
        if (@buf) {
                $w->print(@buf) or wfail;
        }