summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-01-17 16:09:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-18 02:37:19 (GMT)
commitd18ba22154574390dbff2c060f44b9715477e95a (patch)
treeaad88747b04d28f49caf86c9ccb12400ff4c6c0d /Documentation
parenta884d0cb71463c28d0329c593dce1ef9758f6177 (diff)
downloadgit-d18ba22154574390dbff2c060f44b9715477e95a.zip
git-d18ba22154574390dbff2c060f44b9715477e95a.tar.gz
git-d18ba22154574390dbff2c060f44b9715477e95a.tar.bz2
sha1_name: support @{-N} syntax in get_sha1()
Let get_sha1() parse the @{-N} syntax, with docs and tests. Note that while @{-1}^2, @{-2}~5 and such are supported, @{-1}@{1} is currently not allowed. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-rev-parse.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt
index 2921da3..3ccef2f 100644
--- a/Documentation/git-rev-parse.txt
+++ b/Documentation/git-rev-parse.txt
@@ -212,6 +212,9 @@ when you run 'git-merge'.
reflog of the current branch. For example, if you are on the
branch 'blabla', then '@\{1\}' means the same as 'blabla@\{1\}'.
+* The special construct '@\{-<n>\}' means the <n>th branch checked out
+ before the current one.
+
* A suffix '{caret}' to a revision parameter means the first parent of
that commit object. '{caret}<n>' means the <n>th parent (i.e.
'rev{caret}'