]> git.ipfire.org Git - thirdparty/git.git/commit - midx.h
multi-pack-index: write pack names in chunk
authorDerrick Stolee <stolee@gmail.com>
Thu, 12 Jul 2018 19:39:27 +0000 (15:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 18:27:28 +0000 (11:27 -0700)
commit32f3c541e3c8b3ad225c36b1430c9483d0e427ad
tree061563137f962ea4487730093a29b684b622b006
parent396f257018a6031c4eb0803d4693441ad8a9fd10
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>
Documentation/technical/pack-format.txt
midx.c
midx.h
t/helper/test-read-midx.c
t/t5319-multi-pack-index.sh