git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] pack-format: correct multi-pack-index description

From
Johannes Berg <johannes@sipsolutions.net>
Date
Feb 7, 2020, 22:16 UTC
Message-ID
<20200207221640.46876-1-johannes@sipsolutions.net>

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>
---
 Documentation/technical/pack-format.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index cab5bdd2ff0f..d3a142c65202 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -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.
-- 
2.24.1
Next: Derrick Stolee
Message 1 of 8 in “pack-format: correct multi-pack-index description”
  1. pack-format: correct multi-pack-index descriptionJohannes Berg, Feb 7, 2020
  2. Derrick StoleeFeb 10, 2020
  3. Johannes BergFeb 10, 2020
  4. Derrick StoleeFeb 10, 2020
  5. Johannes BergFeb 10, 2020
  6. Derrick StoleeFeb 10, 2020
  7. Johannes BergFeb 10, 2020
  8. Junio C HamanoFeb 10, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.