Document the master@{n} reflog query syntax.
In ab2a1a32 Junio improved the reflog query logic to support obtaining the n-th prior value of a ref, but this was never documented in git-rev-parse. Now it is. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Shawn O. Pearce committed
Jan 17, 2007 at 21:08 UTC
ee53aff486d380986e549ea93a5d68e7b7607293
1 file changed
+8
Documentation/git-rev-parse.txt
+8
@@ -152,6 +152,14 @@ blobs contained in a commit.
152
used immediately following a ref name and the ref must have an
153
existing log ($GIT_DIR/logs/<ref>).
154
155
+* A ref followed by the suffix '@' with an ordinal specification
156
+ enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify
157
+ the n-th prior value of that ref. For example 'master@\{1\}'
158
+ is the immediate prior value of 'master' while 'master@\{5\}'
159
+ is the 5th prior value of 'master'. This suffix may only be used
160
+ immediately following a ref name and the ref must have an existing
161
+ log ($GIT_DIR/logs/<ref>).
162
+
163
* A suffix '{caret}' to a revision parameter means the first parent of
164
that commit object. '{caret}<n>' means the <n>th parent (i.e.
165
'rev{caret}'