From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 50162200A3 for ; Tue, 27 Oct 2020 07:55:01 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 46/52] extsearch: wire up smsg_eml Date: Tue, 27 Oct 2020 07:54:47 +0000 Message-Id: <20201027075453.19163-47-e@80x24.org> In-Reply-To: <20201027075453.19163-1-e@80x24.org> References: <20201027075453.19163-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We'll probably still need synchronous message retrieval in a few places (tests, at least). --- lib/PublicInbox/ExtSearch.pm | 4 ++++ lib/PublicInbox/Inbox.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/ExtSearch.pm b/lib/PublicInbox/ExtSearch.pm index 8997cd54..3e8ca82c 100644 --- a/lib/PublicInbox/ExtSearch.pm +++ b/lib/PublicInbox/ExtSearch.pm @@ -7,6 +7,7 @@ package PublicInbox::ExtSearch; use strict; use v5.10.1; use PublicInbox::Over; +use PublicInbox::Inbox; # for ->reopen, ->mset, ->mset_to_artnums use parent qw(PublicInbox::Search); @@ -37,4 +38,7 @@ sub git { $self->{git} //= PublicInbox::Git->new("$self->{topdir}/ALL.git"); } +no warnings 'once'; +*smsg_eml = \&PublicInbox::Inbox::smsg_eml; + 1; diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm index cbb95b8d..cd5c098a 100644 --- a/lib/PublicInbox/Inbox.pm +++ b/lib/PublicInbox/Inbox.pm @@ -331,7 +331,7 @@ sub msg_by_smsg ($$) { return unless defined $smsg; defined(my $blob = $smsg->{blob}) or return; - git($self)->cat_file($blob); + $self->git->cat_file($blob); } sub smsg_eml {