]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Import.pm
import: only pass Inbox object to SearchIdx->new
[public-inbox.git] / lib / PublicInbox / Import.pm
index e1f48771bd629c6dfe37b15b19138681b5bd1b2a..cb25215d15c39665a9b61895ebed8f98618eba77 100644 (file)
@@ -179,9 +179,9 @@ sub _update_git_info ($$) {
                run_die([@cmd, qw(read-tree -m -v -i), $self->{ref}], $env);
        }
        run_die([@cmd, 'update-server-info'], undef);
-       ($self->{path_type} eq '2/38') and eval {
+       my $ibx = $self->{-inbox};
+       ($ibx && $self->{path_type} eq '2/38') and eval {
                require PublicInbox::SearchIdx;
-               my $ibx = $self->{-inbox} || $git_dir;
                my $s = PublicInbox::SearchIdx->new($ibx);
                $s->index_sync({ ref => $self->{ref} });
        };