diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-08-31 20:52:28 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-01 20:56:43 (GMT) |
commit | b1b82d1c3006ff9e25873d4ff01f976a13b526bb (patch) | |
tree | 803ba42ebaf91e6412393d26164e2a355ac65ffd /t/lib-bitmap.sh | |
parent | aeb4657242a4f7d9e507f88b24652f30f748cb56 (diff) | |
download | git-b1b82d1c3006ff9e25873d4ff01f976a13b526bb.zip git-b1b82d1c3006ff9e25873d4ff01f976a13b526bb.tar.gz git-b1b82d1c3006ff9e25873d4ff01f976a13b526bb.tar.bz2 |
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>
Diffstat (limited to 't/lib-bitmap.sh')
-rw-r--r-- | t/lib-bitmap.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/lib-bitmap.sh b/t/lib-bitmap.sh index 77464da..21d0392 100644 --- a/t/lib-bitmap.sh +++ b/t/lib-bitmap.sh @@ -260,3 +260,7 @@ have_delta () { echo $1 | git cat-file --batch-check="%(deltabase)" >actual && test_cmp expect actual } + +midx_checksum () { + test-tool read-midx --checksum "$1" +} |