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>
Richard Hansen committed
Sep 4, 2013 at 15:04 UTC
abdb54a1d26c79692468aaf2c651e85c2a917c15
1 file changed
+8
-4
Documentation/revisions.txt
+8
-4
@@ -111,10 +111,14 @@ some output processing may assume ref names in UTF-8.
111
112
'<rev>{caret}\{<type>\}', e.g. 'v0.99.8{caret}\{commit\}'::
113
A suffix '{caret}' followed by an object type name enclosed in
114
- brace pair means the object
115
- could be a tag, and dereference the tag recursively until an
116
- object of that type is found or the object cannot be
117
- dereferenced anymore (in which case, barf). '<rev>{caret}0'
114
+ brace pair means dereference the object at '<rev>' recursively until
115
+ an object of type '<type>' is found or the object cannot be
116
+ dereferenced anymore (in which case, barf).
117
+ For example, if '<rev>' is a commit-ish, '<rev>{caret}\{commit\}'
118
+ describes the corresponding commit object.
119
+ Similarly, if '<rev>' is a tree-ish, '<rev>{caret}\{tree\}'
120
+ describes the corresponding tree object.
121
+ '<rev>{caret}0'
122
is a short-hand for '<rev>{caret}\{commit\}'.
123
+
124
'rev{caret}\{object\}' can be used to make sure 'rev' names an