pack-format: correct multi-pack-index description
The description of the multi-pack-index contains a small bug, if all offsets are < 2^32 then there will be no LOFF chunk, not only if they're all < 2^31 (since the highest bit is only needed as the "LOFF-escape" when that's actually needed.) Correct this, and clarify that in that case only offsets up to 2^31-1 can be stored in the OOFF chunk. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Berg committed
Feb 7, 2020 at 23:16 UTC
eb31044ff793de9a8a093f567f5eb262ac196c24
1 file changed
+3
-2
Documentation/technical/pack-format.txt
+3
-2
@@ -315,10 +315,11 @@ CHUNK DATA:
315
Stores two 4-byte values for every object.
316
1: The pack-int-id for the pack storing this object.
317
2: The offset within the pack.
318
- If all offsets are less than 2^31, then the large offset chunk
318
+ If all offsets are less than 2^32, then the large offset chunk
319
will not exist and offsets are stored as in IDX v1.
320
If there is at least one offset value larger than 2^32-1, then
321
- the large offset chunk must exist. If the large offset chunk
321
+ the large offset chunk must exist, and offsets larger than
322
+ 2^31-1 must be stored in it instead. If the large offset chunk
323
exists and the 31st bit is on, then removing that bit reveals
324
the row in the large offsets containing the 8-byte offset of
325
this object.