Skip to content

Commit

Permalink
Documentation: clarify the invalidated tree entry format
Browse files Browse the repository at this point in the history
When the entry_count is -1, the tree is invalidated and therefore has
not associated hash (or object name). Explicitly state that the next
entry starts after the newline.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Carlos Martín Nieto authored and Junio C Hamano committed Aug 1, 2011
1 parent 2579e1d commit e44b6df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Documentation/technical/index-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ GIT index format
- 160-bit object name for the object that would result from writing
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.
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.

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
Expand Down

0 comments on commit e44b6df

Please sign in to comment.