Skip to content

Commit 930f302

Browse files
rhansengitster
authored andcommitted
glossary: more precise definition of tree-ish (a.k.a. treeish)
A tree-ish isn't a ref. Also, mention dereferencing, and that a commit dereferences to a tree, to support gitrevisions(7) and rev-parse's error messages. Signed-off-by: Richard Hansen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a8a5406 commit 930f302

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Documentation/glossary-content.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,18 @@ should not be combined with other pathspec.
499499
<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
500500

501501
[[def_tree-ish]]tree-ish (also treeish)::
502-
A <<def_ref,ref>> pointing to either a <<def_commit_object,commit
503-
object>>, a <<def_tree_object,tree object>>, or a <<def_tag_object,tag
504-
object>> pointing to a tag or commit or tree object.
502+
A <<def_tree_object,tree object>> or an <<def_object,object>>
503+
that can be recursively dereferenced to a tree object.
504+
Dereferencing a <<def_commit_object,commit object>> yields the
505+
tree object corresponding to the <<def_revision,revision>>'s
506+
top <<def_directory,directory>>.
507+
The following are all tree-ishes:
508+
a <<def_commit-ish,commit-ish>>,
509+
a tree object,
510+
a <<def_tag_object,tag object>> that points to a tree object,
511+
a tag object that points to a tag object that points to a tree
512+
object,
513+
etc.
505514

506515
[[def_unmerged_index]]unmerged index::
507516
An <<def_index,index>> which contains unmerged

0 commit comments

Comments
 (0)