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

[PATCH] Improved pack format documentation.

From
Shawn Pearce <spearce@spearce.org>
Date
May 29, 2006, 07:17 UTC
Message-ID
<20060529071718.GD6061@spearce.org>

While trying to implement a pack reader in Java I was mislead by some facts listed in this documentation as well as found a few details to be missing about the pack header.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 Documentation/technical/pack-format.txt |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index ed2decc..0e1ffb2 100644
--- a/Documentation/technical/pack-format.txt
+++ b/Documentation/technical/pack-format.txt
@@ -5,8 +5,13 @@ GIT pack format
 
    - The header appears at the beginning and consists of the following:
 
-     4-byte signature
-     4-byte version number (network byte order)
+     4-byte signature:
+         The signature is: {'P', 'A', 'C', 'K'}
+
+     4-byte version number (network byte order):
+         GIT currently accepts version number 2 or 3 but
+         generates version 2 only.
+
      4-byte number of objects contained in the pack (network byte order)
 
      Observation: we cannot have more than 4G versions ;-) and
@@ -41,7 +46,7 @@ GIT pack format
     8-byte integers to go beyond 4G objects per pack, but it is
     not strictly necessary.
 
-  - The header is followed by sorted 28-byte entries, one entry
+  - The header is followed by sorted 24-byte entries, one entry
     per object in the pack.  Each entry is:
 
     4-byte network byte order integer, recording where the
-- 
1.3.3.g45d8
Message 1 of 1 in “Improved pack format documentation.”
  1. Improved pack format documentation.Shawn Pearce, May 29, 2006

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.