summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorLibravatar Shawn Pearce <spearce@spearce.org>2006-05-29 03:17:18 -0400
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-30 23:09:02 -0700
commit1361fa3e49717de9588e6d925073eb6885cedaa3 (patch)
treee34ee57318307be3aaa4e7db393202e72602312a /Documentation/technical
parentgit_exec_path, execv_git_cmd: ignore empty environment variables (diff)
downloadtgif-1361fa3e49717de9588e6d925073eb6885cedaa3.tar.xz
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>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/pack-format.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/technical/pack-format.txt b/Documentation/technical/pack-format.txt
index ed2decc107..0e1ffb2427 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