about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm27
1 files changed, 1 insertions, 26 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index d95a218e..1266b3b3 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -297,27 +297,7 @@ sub query_remote_mboxrd {
         $lei->{ovv}->ovv_atexit_child($lei);
 }
 
-# called by LeiOverview::each_smsg_cb
-sub git { $_[0]->{git_tmp} // die 'BUG: caller did not set {git_tmp}' }
-
-sub git_tmp ($) {
-        my ($self) = @_;
-        my (%seen, @dirs);
-        my $tmp = File::Temp->newdir("lei_xsearch_git.$$-XXXX", TMPDIR => 1);
-        for my $ibxish (locals($self)) {
-                my $d = File::Spec->canonpath($ibxish->git->{git_dir});
-                $seen{$d} //= push @dirs, "$d/objects\n"
-        }
-        my $git_dir = $tmp->dirname;
-        PublicInbox::Import::init_bare($git_dir);
-        my $f = "$git_dir/objects/info/alternates";
-        open my $alt, '>', $f or die "open($f): $!";
-        print $alt @dirs or die "print $f: $!";
-        close $alt or die "close $f: $!";
-        my $git = PublicInbox::Git->new($git_dir);
-        $git->{-tmp} = $tmp;
-        $git;
-}
+sub git { $_[0]->{git} // die 'BUG: git uninitialized' }
 
 sub xsearch_done_wait { # dwaitpid callback
         my ($arg, $pid) = @_;
@@ -460,11 +440,6 @@ sub do_query {
                 # 1031: F_SETPIPE_SZ
                 fcntl($lei->{startq}, 1031, 4096) if $^O eq 'linux';
         }
-        if (!$lei->{opt}->{threads} && locals($self)) { # for query_mset
-                # lei->{git_tmp} is set for wq_wait_old so we don't
-                # delete until all lei2mail + lei_xsearch workers are reaped
-                $lei->{git_tmp} = $self->{git_tmp} = git_tmp($self);
-        }
         $self->wq_workers_start('lei_xsearch', undef,
                                 $lei->oldset, { lei => $lei });
         my $op = delete $lei->{pkt_op_c};