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:32 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-20 21:27:28 +0300
commit662148c4356620f6567b0a689602079339ebadb7 (patch)
treef48a63aa641e6b9bc8720e85ce3161e56bf89dcc /midx.h
parentd7cacf29ccfcb2a33bcd8468f83daf822430f19a (diff)
midx: write object offsets
The final pair of chunks for the multi-pack-index file stores the object offsets. We default to using 32-bit offsets as in the pack-index version 1 format, but if there exists an offset larger than 32-bits, we use a trick similar to the pack-index version 2 format by storing all offsets at least 2^31 in a 64-bit table; we use the 32-bit table to point into that 64-bit table as necessary. We only store these 64-bit offsets if necessary, so create a test that manipulates a version 2 pack-index to fake a large offset. This allows us to test that the large offset table is created, but the data does not match the actual packfile offsets. The multi-pack-index offset does match the (corrupted) pack-index offset, so a future feature will compare these offsets during a 'verify' step. 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 8572cf0f4b..e15966272f 100644
--- a/midx.h
+++ b/midx.h
@@ -17,6 +17,8 @@ struct multi_pack_index {
const unsigned char *chunk_pack_names;
const uint32_t *chunk_oid_fanout;
const unsigned char *chunk_oid_lookup;
+ const unsigned char *chunk_object_offsets;
+ const unsigned char *chunk_large_offsets;
const char **pack_names;
char object_dir[FLEX_ARRAY];