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

[PATCH 4/4] revisions.txt: fix and clarify <rev>^{<type>}

From
RHRichard Hansen <rhansen@bbn.com>
Date
Jun 19, 2013, 02:09 UTC
Message-ID
<1371607780-2966-5-git-send-email-rhansen@bbn.com>
In-Reply-To
<1371607780-2966-1-git-send-email-rhansen@bbn.com>

If possible, <rev> will be dereferenced even if it is not a tag type (e.g., commit dereferenced to a tree).

Signed-off-by: Richard Hansen <rhansen@bbn.com>
---
 Documentation/revisions.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 09896a3..bf563cf 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -114,10 +114,14 @@ some output processing may assume ref names in UTF-8.
 
 '<rev>{caret}\{<type>\}', e.g. 'v0.99.8{caret}\{commit\}'::
   A suffix '{caret}' followed by an object type name enclosed in
-  brace pair means the object
-  could be a tag, and dereference the tag recursively until an
-  object of that type is found or the object cannot be
-  dereferenced anymore (in which case, barf).  '<rev>{caret}0'
+  brace pair means dereference the object at '<rev>' recursively until
+  an object of type '<type>' is found or the object cannot be
+  dereferenced anymore (in which case, barf).
+  For example, if '<rev>' is a committish, '<rev>{caret}\{commit\}'
+  specifies the corresponding commit object.
+  Similarly, if '<rev>' is a tree-ish, '<rev>{caret}\{tree\}'
+  specifies the corresponding tree object.
+  '<rev>{caret}0'
   is a short-hand for '<rev>{caret}\{commit\}'.
 +
 'rev{caret}\{object\}' can be used to make sure 'rev' names an
-- 
1.8.3.1
Previous: Richard Hansen
Message 24 of 24 in “documentation cleanups for <rev>^{<type>}”
  1. 0/4 documentation cleanups for <rev>^{<type>}Richard Hansen, Jun 19, 2013
  2. 1/4 glossary: add 'treeish' as a synonym for 'tree-ish'Richard Hansen, Jun 19, 2013
  3. Junio C HamanoJun 19, 2013
  4. Richard HansenJun 19, 2013
  5. Junio C HamanoJun 19, 2013
  6. Richard HansenJun 19, 2013
  7. 2/4 glossary: define committish (a.k.a. commit-ish)Richard Hansen, Jun 19, 2013
  8. Ramkumar RamachandraJun 19, 2013
  9. Richard HansenJun 19, 2013
  10. Ramkumar RamachandraJun 19, 2013
  11. Richard HansenJun 19, 2013
  12. Richard HansenJun 19, 2013
  13. Jonathan NiederJun 19, 2013
  14. Junio C HamanoJun 19, 2013
  15. Richard HansenJun 19, 2013
  16. Junio C HamanoJun 19, 2013
  17. Richard HansenJun 19, 2013
  18. Junio C HamanoJun 19, 2013
  19. Richard HansenJun 19, 2013
  20. Junio C HamanoJun 20, 2013
  21. Ramkumar RamachandraJun 20, 2013
  22. Ramkumar RamachandraJun 20, 2013
  23. 3/4 glossary: more precise definition of tree-ish (a.k.a. treeish)Richard Hansen, Jun 19, 2013
  24. 4/4 revisions.txt: fix and clarify <rev>^{<type>}Richard Hansen, Jun 19, 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.