summaryrefslogtreecommitdiff
path: root/Documentation/revisions.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-03 09:34:53 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-03 09:34:54 -0700
commit1b7b22bfd0fb1fe62cf9d40e2b1de031cc48771d (patch)
treefe0c000ccf0b96163780404babd29ccbaf69d09e /Documentation/revisions.txt
parent41ae34d136e623cb4a6c6096d905dc648daabfb9 (diff)
parenta6a3f2cc0761a347e8796280a1544e2a0d08cb51 (diff)
downloadgit-1b7b22bfd0fb1fe62cf9d40e2b1de031cc48771d.tar.gz
Merge branch 'jc/sha1-name-object-peeler'
There was no good way to ask "I have a random string that came from outside world. I want to turn it into a 40-hex object name while making sure such an object exists". A new peeling suffix ^{object} can be used for that purpose, together with "rev-parse --verify". * jc/sha1-name-object-peeler: peel_onion(): teach $foo^{object} peeler peel_onion: disambiguate to favor tree-ish when we know we want a tree-ish
Diffstat (limited to 'Documentation/revisions.txt')
-rw-r--r--Documentation/revisions.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 314e25da73..1707d451b6 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -116,6 +116,11 @@ some output processing may assume ref names in UTF-8.
object of that type is found or the object cannot be
dereferenced anymore (in which case, barf). '<rev>{caret}0'
is a short-hand for '<rev>{caret}\{commit\}'.
++
+'rev{caret}\{object\}' can be used to make sure 'rev' names an
+object that exists, without requiring 'rev' to be a tag, and
+without dereferencing 'rev'; because a tag is already an object,
+it does not have to be dereferenced even once to get to an object.
'<rev>{caret}\{\}', e.g. 'v0.99.8{caret}\{\}'::
A suffix '{caret}' followed by an empty brace pair