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

[PATCH 2/2] pack-format.txt: document lengths at start of delta data

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Dec 21, 2020, 07:54 UTC
Message-ID
<c515a44179576db202c8b6d2419459df0e67ec0a.1608537234.git.martin.agren@gmail.com>
In-Reply-To
<cover.1608537234.git.martin.agren@gmail.com>

We document the delta data as a set of instructions, but forget to document the two lengths that precede those instructions: the length of the base object and the length of the object to be reconstructed. Fix this omission.

Reported-by: Ross Light <ross@zombiezen.com>
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/technical/pack-format.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index 42198de74c..05889a2e43 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -82,7 +82,10 @@ Ref-delta can also refer to an object outside the pack (i.e. the
 so-called "thin pack"). When stored on disk however, the pack should
 be self contained to avoid cyclic dependency.
 
-The delta data is a sequence of instructions to reconstruct an object
+The delta data starts with the length of the base object and the
+length of the object to be reconstructed. These lengths are
+encoded as varints.  The remainder of
+the delta data is a sequence of instructions to reconstruct the object
 from the base object. If the base object is deltified, it must be
 converted to canonical form first. Each instruction appends more and
 more data to the target object until it's complete. There are two
-- 
2.30.0.rc1
Previous: Martin ÅgrenNext: Ross Light
Message 6 of 8 in “Documentation errors for HTTP protocol v2 and packfile”
  1. Ross LightDec 19, 2020
  2. 0/2 pack-format.txt: document lengths at start of delta dataMartin Ågren, Dec 21, 2020
  3. 1/2 pack-format.txt: define "varint" formatMartin Ågren, Dec 21, 2020
  4. Junio C HamanoDec 21, 2020
  5. Martin ÅgrenDec 29, 2020
  6. 2/2 pack-format.txt: document lengths at start of delta dataMartin Ågren, Dec 21, 2020
  7. Ross LightDec 23, 2020
  8. pack-format.txt: document sizes at start of delta dataMartin Ågren, Dec 29, 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.