]> git.99rst.org Git - git.git/commit
csum-file: introduce checksum_valid()
authorTaylor Blau <redacted>
Wed, 23 Jun 2021 18:39:07 +0000 (14:39 -0400)
committerJunio C Hamano <redacted>
Tue, 29 Jun 2021 03:36:17 +0000 (20:36 -0700)
commitf9221e2cf5049805d9151b3db6a5eef07b1cc92e
tree962e5c2742ae80de7f45353ba5813580caeeaa99
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb
csum-file: introduce checksum_valid()

Introduce a new function which checks the validity of a file's trailing
checksum. This is similar to hashfd_check(), but different since it is
intended to be used by callers who aren't writing the same data (like
`git index-pack --verify`), but who instead want to validate the
integrity of data that they are reading.

Rewrite the first of two callers which could benefit from this new
function in pack-check.c. Subsequent callers will be added in the
following patches.

Helped-by: Jeff King <redacted>
Signed-off-by: Jeff King <redacted>
Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
csum-file.c
csum-file.h
pack-check.c
git clone https://git.99rst.org/PROJECT