summaryrefslogtreecommitdiff
path: root/Documentation/revisions.txt
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@bbn.com>2013-09-04 15:04:33 -0400
committerJunio C Hamano <gitster@pobox.com>2013-09-04 15:03:59 -0700
commitabdb54a1d26c79692468aaf2c651e85c2a917c15 (patch)
tree2243ed3935f809a4733d5b7ef612f39dc32a44a9 /Documentation/revisions.txt
parent930f302cdbdd8410188fe306341117cd10af3383 (diff)
downloadgit-abdb54a1d26c79692468aaf2c651e85c2a917c15.tar.gz
revisions.txt: fix and clarify <rev>^{<type>}
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/revisions.txt')
-rw-r--r--Documentation/revisions.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index d477b3f6bc..b0f4284cfb 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 commit-ish, '<rev>{caret}\{commit\}'
+ describes the corresponding commit object.
+ Similarly, if '<rev>' is a tree-ish, '<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