t/helper/test-read-midx.c: add --checksum mode
commitb1b82d1c3006ff9e25873d4ff01f976a13b526bb
authorTaylor Blau <me@ttaylorr.com>
Tue, 31 Aug 2021 20:52:28 +0000 (31 16:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Sep 2021 20:56:43 +0000 (1 13:56 -0700)
tree803ba42ebaf91e6412393d26164e2a355ac65ffd
parentaeb4657242a4f7d9e507f88b24652f30f748cb56
t/helper/test-read-midx.c: add --checksum mode

Subsequent tests will want to check for the existence of a multi-pack
bitmap which matches the multi-pack-index stored in the pack directory.

The multi-pack bitmap includes the hex checksum of the MIDX it
corresponds to in its filename (for example,
'$packdir/multi-pack-index-<checksum>.bitmap'). As a result, some tests
want a way to learn what '<checksum>' is.

This helper addresses that need by printing the checksum of the
repository's multi-pack-index.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-read-midx.c
t/lib-bitmap.sh