Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/midx.h
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2018-07-12 22:39:27 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-20 21:27:28 +0300
commit32f3c541e3c8b3ad225c36b1430c9483d0e427ad (patch)
tree061563137f962ea4487730093a29b684b622b006 /midx.h
parent396f257018a6031c4eb0803d4693441ad8a9fd10 (diff)
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 'midx.h')
-rw-r--r--midx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/midx.h b/midx.h
index 0e05051bca..38af01fa3b 100644
--- a/midx.h
+++ b/midx.h
@@ -14,6 +14,8 @@ struct multi_pack_index {
uint32_t num_packs;
uint32_t num_objects;
+ const unsigned char *chunk_pack_names;
+
char object_dir[FLEX_ARRAY];
};