summaryrefslogtreecommitdiff
path: root/Documentation/technical
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-12-13 01:14:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-13 18:12:25 (GMT)
commit4a6385fe555f810e8168399df673d00addffb721 (patch)
tree3a737450f654dbd3c206d1c7f4da500628d91cb3 /Documentation/technical
parentafd7bd22209c53ae4d3c73dd4bc4b225ec55e10a (diff)
downloadgit-4a6385fe555f810e8168399df673d00addffb721.zip
git-4a6385fe555f810e8168399df673d00addffb721.tar.gz
git-4a6385fe555f810e8168399df673d00addffb721.tar.bz2
index-format.txt: clarify what is "invalid"
A cache-tree entry with a negative entry count is considered invalid by the current Git; it records that we do not know the object name of a tree that would result by writing the directory covered by the cache-tree as a tree object. Clarify that any entry with a negative entry count is invalid, but the implementations must write -1 there. This way, we can later decide to allow writers to use negative values other than -1 to encode optional information on such invalidated entries without harming interoperability; we do not know what will be encoded and how, so we keep these other negative values as reserved for now. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical')
-rw-r--r--Documentation/technical/index-format.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 9d25b30..ce28a7a 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -161,8 +161,9 @@ GIT index format
this span of index as a tree.
An entry can be in an invalidated state and is represented by having
- -1 in the entry_count field. In this case, there is no object name
- and the next entry starts immediately after the newline.
+ a negative number in the entry_count field. In this case, there is no
+ object name and the next entry starts immediately after the newline.
+ When writing an invalid entry, -1 should always be used as entry_count.
The entries are written out in the top-down, depth-first order. The
first entry represents the root level of the repository, followed by the