summaryrefslogtreecommitdiff
path: root/t/helper/test-read-midx.c
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <stolee@gmail.com>2018-07-12 15:39:27 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-07-20 11:27:28 -0700
commit32f3c541e3c8b3ad225c36b1430c9483d0e427ad (patch)
tree061563137f962ea4487730093a29b684b622b006 /t/helper/test-read-midx.c
parentmulti-pack-index: read packfile list (diff)
downloadtgif-32f3c541e3c8b3ad225c36b1430c9483d0e427ad.tar.xz
multi-pack-index: write pack names in chunk
The multi-pack-index needs to track which packfiles it indexes. Store these in our first required chunk. Since filenames are not well structured, add padding to keep good alignment in later chunks. Modify the 'git multi-pack-index read' subcommand to output the existence of the pack-file name chunk. Modify t5319-multi-pack-index.sh to reflect this new output and the new expected number of chunks. Defense in depth: A pattern we are using in the multi-pack-index feature is to verify the data as we write it. We want to ensure we never write invalid data to the multi-pack-index. There are many checks that verify that the values we are writing fit the format definitions. This mainly helps developers while working on the feature, but it can also identify issues that only appear when dealing with very large data sets. These large sets are hard to encode into test cases. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-read-midx.c')
-rw-r--r--t/helper/test-read-midx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 988a487169..3f2d2cfa78 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -17,6 +17,13 @@ static int read_midx_file(const char *object_dir)
m->num_chunks,
m->num_packs);
+ printf("chunks:");
+
+ if (m->chunk_pack_names)
+ printf(" pack-names");
+
+ printf("\n");
+
printf("object-dir: %s\n", m->object_dir);
return 0;