about summary refs log tree commit homepage
path: root/lib/PublicInbox/Import.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-15 09:50:40 +0000
committerEric Wong <e@80x24.org>2019-11-16 11:05:23 +0000
commit2500dfda84f86a8b83e89bf69cfd32ace54edead (patch)
tree022bc99472e58dd89daf680f92460f6269047a3a /lib/PublicInbox/Import.pm
parentfe565af9e3e1634412c21fb2fe2bb7612c430e47 (diff)
downloadpublic-inbox-2500dfda84f86a8b83e89bf69cfd32ace54edead.tar.gz
import: only pass Inbox object to SearchIdx->new
SearchIdx->new no longer accepts a GIT_DIR path as its argument
since commit 585314673236d664729fe3ab2d4fb229d1c0f2d5
("searchidx: require PublicInbox::Inbox (or InboxWritable) ref")
Diffstat (limited to 'lib/PublicInbox/Import.pm')
-rw-r--r--lib/PublicInbox/Import.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index e1f48771..cb25215d 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -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} });
         };