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 <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Richard Hansen committed
Sep 4, 2013 at 15:04 UTC
930f302cdbdd8410188fe306341117cd10af3383
1 file changed
+12
-3
Documentation/glossary-content.txt
+12
-3
@@ -499,9 +499,18 @@ should not be combined with other pathspec.
499
<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
500
501
[[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.
514
515
[[def_unmerged_index]]unmerged index::
516
An <<def_index,index>> which contains unmerged