@matheusbsbs / matheus-bagliano / commits / 1361fa3e49
Fork 0

Improved pack format documentation.

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> Signed-off-by: Junio C Hamano <junkio@cox.net>

Shawn Pearce committed May 29, 2006 at 03:17 UTC 1361fa3e49717de9588e6d925073eb6885cedaa3
1 file changed +8 -3
Documentation/technical/pack-format.txt
+8 -3
@@ -5,8 +5,13 @@ GIT pack format
5
6 - The header appears at the beginning and consists of the following:
7
8 - 4-byte signature
9 - 4-byte version number (network byte order)
8 + 4-byte signature:
9 + The signature is: {'P', 'A', 'C', 'K'}
10 +
11 + 4-byte version number (network byte order):
12 + GIT currently accepts version number 2 or 3 but
13 + generates version 2 only.
14 +
15 4-byte number of objects contained in the pack (network byte order)
16
17 Observation: we cannot have more than 4G versions ;-) and
@@ -41,7 +46,7 @@ GIT pack format
46 8-byte integers to go beyond 4G objects per pack, but it is
47 not strictly necessary.
48
44 - - The header is followed by sorted 28-byte entries, one entry
49 + - The header is followed by sorted 24-byte entries, one entry
50 per object in the pack. Each entry is:
51
52 4-byte network byte order integer, recording where the