From 443ab96a3b329556e26a57b02c7383d5faf536b3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Dec 2020 21:21:30 +0000 Subject: extsearchidx: ck_existing: set $OID for warning context 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(+) (limited to 'lib') 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 -- cgit v1.2.3-24-ge0c7