summaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <stolee@gmail.com>2018-07-12 15:39:32 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-07-20 11:27:28 -0700
commit662148c4356620f6567b0a689602079339ebadb7 (patch)
treef48a63aa641e6b9bc8720e85ce3161e56bf89dcc /hash.h
parentmidx: write object id fanout chunk (diff)
downloadtgif-662148c4356620f6567b0a689602079339ebadb7.tar.xz
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 'hash.h')
0 files changed, 0 insertions, 0 deletions