From: Eric Wong Date: Tue, 19 Oct 2021 09:33:46 +0000 (+0000) Subject: lei_mail_sync: show non-matching SHA X-Git-Tag: v1.7.0~98 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=9f8e28a80374e905c831d2d5f3a45c6a9d708fa3 lei_mail_sync: show non-matching SHA It could prove useful for diagnosing bugs (either on our end or an MUA's), or storage device failures. --- diff --git a/lib/PublicInbox/LeiMailSync.pm b/lib/PublicInbox/LeiMailSync.pm index f2f1e3ed..e70cb5de 100644 --- a/lib/PublicInbox/LeiMailSync.pm +++ b/lib/PublicInbox/LeiMailSync.pm @@ -339,9 +339,12 @@ WHERE b.oidbin = ? next unless -s $fh; local $/; my $raw = <$fh>; - if ($vrfy && git_sha(1, \$raw)->hexdigest ne $oidhex) { - warn "$f changed $oidhex\n"; - next; + if ($vrfy) { + my $got = git_sha(1, \$raw)->hexdigest; + if ($got ne $oidhex) { + warn "$f changed $oidhex => $got\n"; + next; + } } return \$raw; }