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=-3.8 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 F08C81FA19 for ; Tue, 8 Dec 2020 21:21:31 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/6] extsearchidx: ck_existing: set $OID for warning context Date: Tue, 8 Dec 2020 21:21:30 +0000 Message-Id: <20201208212130.5832-7-e@80x24.org> In-Reply-To: <20201208212130.5832-1-e@80x24.org> References: <20201208212130.5832-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The content_hash() hash in the same scope may trigger warnings for a given blob, so ensure we correctly report the blob where it happens. --- lib/PublicInbox/ExtSearchIdx.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index c82d1633..11f7786d 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -222,6 +222,8 @@ sub ck_existing { # git->cat_async callback if ($type eq 'missing') { _blob_missing($req); } elsif (!is_bad_blob($oid, $type, $size, $smsg->{blob})) { + my $self = $req->{self} // die 'BUG: {self} missing'; + local $self->{current_info} = "$self->{current_info} $oid"; my $cur = PublicInbox::Eml->new($bref); if (content_hash($cur) eq $req->{chash}) { push @{$req->{indexed}}, $smsg; # for do_xpost