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

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

From
RHRichard Hansen <rhansen@bbn.com>
Date
Sep 2, 2013, 05:34 UTC
Message-ID
<1378100066-31889-7-git-send-email-rhansen@bbn.com>
In-Reply-To
<1378100066-31889-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 569b563..1f1e79b 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -111,10 +111,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\}'
+  describes the corresponding commit object.
+  Similarly, if '<rev>' is a treeish, '<rev>{caret}\{tree\}' describes
+  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.4
Previous: Richard HansenNext: Richard Hansen
Message 17 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.