Skip to content

Commit abdb54a

Browse files
rhansengitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 930f302 commit abdb54a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Documentation/revisions.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,14 @@ some output processing may assume ref names in UTF-8.
111111

112112
'<rev>{caret}\{<type>\}', e.g. 'v0.99.8{caret}\{commit\}'::
113113
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'
118122
is a short-hand for '<rev>{caret}\{commit\}'.
119123
+
120124
'rev{caret}\{object\}' can be used to make sure 'rev' names an

0 commit comments

Comments
 (0)