diff options
author | Eric Wong <e@80x24.org> | 2020-12-07 07:40:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-08 07:19:30 +0000 |
commit | 04320a20df07cd4f1ea344f3aa3ee6e15128a356 (patch) | |
tree | cb76aaedceb00d7bd8f847683bba9bde0718e4c4 | |
parent | 0db4d865f2119a7d226edba4c2c4a9a301a2464a (diff) | |
download | public-inbox-04320a20df07cd4f1ea344f3aa3ee6e15128a356.tar.gz |
There is no need to verify checksums of data already stored in git. Doing this ourselves also limits flexibility in moving to other hashes.
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 4de47b58..819c7903 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -91,14 +91,6 @@ sub attach_config { $cfg->each_inbox(\&_ibx_attach, $self); } -sub git_blob_digest ($) { - my ($bref) = @_; - my $dig = Digest::SHA->new(1); # XXX SHA256 later - $dig->add('blob '.length($$bref)."\0"); - $dig->add($$bref); - $dig; -} - sub is_bad_blob ($$$$) { my ($oid, $type, $size, $expect_oid) = @_; if ($type ne 'blob') { @@ -245,10 +237,6 @@ sub cur_ibx_xnum ($$) { my ($req, $bref) = @_; my $ibx = $req->{ibx} or die 'BUG: current {ibx} missing'; - # XXX overkill? - git_blob_digest($bref)->hexdigest eq $req->{oid} or die - "BUG: blob mismatch $req->{oid}"; - $req->{eml} = PublicInbox::Eml->new($bref); $req->{chash} = content_hash($req->{eml}); $req->{mids} = mids($req->{eml}); |