git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 5/7] glossary: more precise definition of tree-ish (a.k.a. treeish)

From
RHRichard Hansen <rhansen@bbn.com>
Date
Sep 4, 2013, 19:04 UTC
Message-ID
<1378321474-7125-6-git-send-email-rhansen@bbn.com>
In-Reply-To
<1378321474-7125-1-git-send-email-rhansen@bbn.com>

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>
---
 Documentation/glossary-content.txt | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt
index 47e901e..3466ce9 100644
--- a/Documentation/glossary-content.txt
+++ b/Documentation/glossary-content.txt
@@ -499,9 +499,18 @@ should not be combined with other pathspec.
 	<<def_tree,tree>> is equivalent to a <<def_directory,directory>>.
 
 [[def_tree-ish]]tree-ish (also treeish)::
-	A <<def_ref,ref>> pointing to either a <<def_commit_object,commit
-	object>>, a <<def_tree_object,tree object>>, or a <<def_tag_object,tag
-	object>> pointing to a tag or commit or tree object.
+	A <<def_tree_object,tree object>> or an <<def_object,object>>
+	that can be recursively dereferenced to a tree object.
+	Dereferencing a <<def_commit_object,commit object>> yields the
+	tree object corresponding to the <<def_revision,revision>>'s
+	top <<def_directory,directory>>.
+	The following are all tree-ishes:
+	a <<def_commit-ish,commit-ish>>,
+	a tree object,
+	a <<def_tag_object,tag object>> that points to a tree object,
+	a tag object that points to a tag object that points to a tree
+	object,
+	etc.
 
 [[def_unmerged_index]]unmerged index::
 	An <<def_index,index>> which contains unmerged
-- 
1.8.4
Previous: Richard HansenNext: Richard Hansen
Message 9 of 18 in “documentation cleanups for <rev>^{<type>}”
  1. 0/7 documentation cleanups for <rev>^{<type>}Richard Hansen, Sep 2, 2013
  2. 1/7 glossary: mention 'treeish' as an alternative to 'tree-ish'Richard Hansen, Sep 2, 2013
  3. Junio C HamanoSep 3, 2013
  4. 0/7 documentation cleanups for <rev>^{<type>}Richard Hansen, Sep 4, 2013
  5. 1/7 glossary: mention 'treeish' as an alternative to 'tree-ish'Richard Hansen, Sep 4, 2013
  6. 2/7 glossary: define commit-ish (a.k.a. committish)Richard Hansen, Sep 4, 2013
  7. 3/7 use 'tree-ish' instead of 'treeish'Richard Hansen, Sep 4, 2013
  8. 4/7 use 'commit-ish' instead of 'committish'Richard Hansen, Sep 4, 2013
  9. 5/7 glossary: more precise definition of tree-ish (a.k.a. treeish)Richard Hansen, Sep 4, 2013
  10. 6/7 revisions.txt: fix and clarify <rev>^{<type>}Richard Hansen, Sep 4, 2013
  11. 7/7 glossary: fix and clarify the definition of 'ref'Richard Hansen, Sep 4, 2013
  12. Junio C HamanoSep 4, 2013
  13. 2/7 glossary: define committish (a.k.a. commit-ish)Richard Hansen, Sep 2, 2013
  14. 3/7 use 'treeish' instead of 'tree-ish'Richard Hansen, Sep 2, 2013
  15. 4/7 use 'committish' instead of 'commit-ish'Richard Hansen, Sep 2, 2013
  16. 5/7 glossary: more precise definition of treeish (a.k.a. tree-ish)Richard Hansen, Sep 2, 2013
  17. 6/7 revisions.txt: fix and clarify <rev>^{<type>}Richard Hansen, Sep 2, 2013
  18. 7/7 glossary: fix and clarify the definition of 'ref'Richard Hansen, Sep 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.