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 {
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to