Skip to content

Commit 47e329e

Browse files
draenoggitster
authored andcommitted
rev-parse: clarify documentation of $name@{upstream} syntax
"git rev-parse" interprets string in string@{upstream} as a name of a branch not a ref. For example, refs/heads/master@{upstream} looks for an upstream branch that is merged by git-pull to ref refs/heads/refs/heads/master not to refs/heads/master. However the documentation could mislead a user to believe that the string is interpreted as ref. Signed-off-by: Kacper Kornet <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b2981d0 commit 47e329e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Documentation/revisions.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ some output processing may assume ref names in UTF-8.
8888
The construct '@\{-<n>\}' means the <n>th branch checked out
8989
before the current one.
9090

91-
'<refname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
92-
The suffix '@\{upstream\}' to a ref (short form '<refname>@\{u\}') refers to
93-
the branch the ref is set to build on top of. A missing ref defaults
94-
to the current branch.
91+
'<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
92+
The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
93+
refers to the branch that the branch specified by branchname is set to build on
94+
top of. A missing branchname defaults to the current one.
9595

9696
'<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
9797
A suffix '{caret}' to a revision parameter means the first parent of

0 commit comments

Comments
 (0)