提交 ee53aff4 编写于 作者: S Shawn O. Pearce 提交者: Junio C Hamano

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: NShawn O. Pearce <spearce@spearce.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 de3820f5
......@@ -152,6 +152,14 @@ blobs contained in a commit.
used immediately following a ref name and the ref must have an
existing log ($GIT_DIR/logs/<ref>).
* A ref followed by the suffix '@' with an ordinal specification
enclosed in a brace pair (e.g. '\{1\}', '\{15\}') to specify
the n-th prior value of that ref. For example 'master@\{1\}'
is the immediate prior value of 'master' while 'master@\{5\}'
is the 5th prior value of 'master'. This suffix may only be used
immediately following a ref name and the ref must have an existing
log ($GIT_DIR/logs/<ref>).
* 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}'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册