Skip to content

Commit

Permalink
revisions.txt: fix and clarify <rev>^{<type>}
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Hansen authored and Junio C Hamano committed Sep 4, 2013
1 parent 930f302 commit abdb54a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Documentation/revisions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit abdb54a

Please sign in to comment.