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

[PATCH] Documentation: distinguish between ref and offset deltas in pack-format

From
SSStefan Saasen <ssaasen@atlassian.com>
Date
Apr 12, 2013, 05:56 UTC
Message-ID
<1365746184-75910-1-git-send-email-ssaasen@atlassian.com>

eb32d236 introduced the OBJ_OFS_DELTA object that uses a relative offset to identify the base object instead of the 20-byte SHA1 reference. The pack file documentation only mentions the SHA1 based reference in its description of the deltified object entry.

Update the pack format documentation to clarify that the deltified object representation refers to its base using either a relative negative offset or the absolute SHA1 identifier.

Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>
---
 Documentation/technical/pack-format.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index 0e37ec9..61445c2 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -26,7 +26,9 @@ Git pack format
 
      (deltified representation)
      n-byte type and length (3-bit type, (n-1)*7+4-bit length)
-     20-byte base object name
+     20-byte base object name if OBJ_REF_DELTA or a negative relative
+         offset from the delta object's position in the pack if this
+         is an OBJ_OFS_DELTA object
      compressed delta data
 
      Observation: length of each object is encoded in a variable
-- 
1.8.2
Next: Junio C Hamano
Message 1 of 2 in “Documentation: distinguish between ref and offset deltas in pack-format”
  1. Documentation: distinguish between ref and offset deltas in pack-formatStefan Saasen, Apr 12, 2013
  2. Junio C HamanoApr 12, 2013

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.