summaryrefslogtreecommitdiff
path: root/Documentation/technical/index-format.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-27 23:02:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-27 23:03:31 (GMT)
commitafd7bd22209c53ae4d3c73dd4bc4b225ec55e10a (patch)
tree43247b87ff62a90d54289356f7ed1eb4dba489aa /Documentation/technical/index-format.txt
parent9170c7ab2889a295de49458d7bd37d82f1556cd6 (diff)
downloadgit-afd7bd22209c53ae4d3c73dd4bc4b225ec55e10a.zip
git-afd7bd22209c53ae4d3c73dd4bc4b225ec55e10a.tar.gz
git-afd7bd22209c53ae4d3c73dd4bc4b225ec55e10a.tar.bz2
index-v4: document the entry format
Document the format so that others can learn from and build on top of the series. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/index-format.txt')
-rw-r--r--Documentation/technical/index-format.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 8930b3f..9d25b30 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -113,9 +113,22 @@ GIT index format
are encoded in 7-bit ASCII and the encoding cannot contain a NUL
byte (iow, this is a UNIX pathname).
+ (Version 4) In version 4, the entry path name is prefix-compressed
+ relative to the path name for the previous entry (the very first
+ entry is encoded as if the path name for the previous entry is an
+ empty string). At the beginning of an entry, an integer N in the
+ variable width encoding (the same encoding as the offset is encoded
+ for OFS_DELTA pack entries; see pack-format.txt) is stored, followed
+ by a NUL-terminated string S. Removing N bytes from the end of the
+ path name for the previous entry, and replacing it with the string S
+ yields the path name for this entry.
+
1-8 nul bytes as necessary to pad the entry to a multiple of eight bytes
while keeping the name NUL-terminated.
+ (Version 4) In version 4, the padding after the pathname does not
+ exist.
+
== Extensions
=== Cached tree