diff options
author | Taylor Blau <me@ttaylorr.com> | 2021-08-31 22:52:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-01 22:56:43 +0200 |
commit | b1b82d1c3006ff9e25873d4ff01f976a13b526bb (patch) | |
tree | 803ba42ebaf91e6412393d26164e2a355ac65ffd /t/lib-bitmap.sh | |
parent | t5310: move some tests to lib-bitmap.sh (diff) | |
download | git-b1b82d1c3006ff9e25873d4ff01f976a13b526bb.tar.xz git-b1b82d1c3006ff9e25873d4ff01f976a13b526bb.zip |
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 77464da6fd..21d0392dda 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" +} |