From d7cacf29ccfcb2a33bcd8468f83daf822430f19a Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Thu, 12 Jul 2018 15:39:31 -0400 Subject: midx: write object id fanout chunk Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- t/helper/test-read-midx.c | 4 +++- t/t5319-multi-pack-index.sh | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 't') diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c index de6d452a7c..f7c17b0940 100644 --- a/t/helper/test-read-midx.c +++ b/t/helper/test-read-midx.c @@ -22,10 +22,12 @@ static int read_midx_file(const char *object_dir) if (m->chunk_pack_names) printf(" pack-names"); + if (m->chunk_oid_fanout) + printf(" oid-fanout"); if (m->chunk_oid_lookup) printf(" oid-lookup"); - printf("\n"); + printf("\nnum_objects: %d\n", m->num_objects); printf("packs:\n"); for (i = 0; i < m->num_packs; i++) diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index 4813610115..95e731ae52 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -5,10 +5,12 @@ test_description='multi-pack-indexes' midx_read_expect () { NUM_PACKS=$1 + NUM_OBJECTS=$2 { cat <<-EOF && - header: 4d494458 1 2 $NUM_PACKS - chunks: pack-names oid-lookup + header: 4d494458 1 3 $NUM_PACKS + chunks: pack-names oid-fanout oid-lookup + num_objects: $NUM_OBJECTS packs: EOF if test $NUM_PACKS -ge 1 @@ -24,7 +26,7 @@ midx_read_expect () { test_expect_success 'write midx with no packs' ' test_when_finished rm -f pack/multi-pack-index && git multi-pack-index --object-dir=. write && - midx_read_expect 0 + midx_read_expect 0 0 ' generate_objects () { @@ -74,13 +76,13 @@ test_expect_success 'write midx with one v1 pack' ' pack=$(git pack-objects --index-version=1 pack/test