]> git.ipfire.org Git - thirdparty/git.git/commitdiff
pack-format: correct multi-pack-index description
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 7 Feb 2020 22:16:40 +0000 (23:16 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2020 17:01:48 +0000 (09:01 -0800)
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>
Documentation/technical/pack-format.txt

index cab5bdd2ff0f887cb991e2dc9ba3cccec34f8a0a..d3a142c6520258033f95b7e427be41f930883f99 100644 (file)
@@ -315,10 +315,11 @@ CHUNK DATA:
            Stores two 4-byte values for every object.
            1: The pack-int-id for the pack storing this object.
            2: The offset within the pack.
-               If all offsets are less than 2^31, then the large offset chunk
+               If all offsets are less than 2^32, then the large offset chunk
                will not exist and offsets are stored as in IDX v1.
                If there is at least one offset value larger than 2^32-1, then
-               the large offset chunk must exist. If the large offset chunk
+               the large offset chunk must exist, and offsets larger than
+               2^31-1 must be stored in it instead. If the large offset chunk
                exists and the 31st bit is on, then removing that bit reveals
                the row in the large offsets containing the 8-byte offset of
                this object.