Skip to content

Commit 8cdab69

Browse files
TaoKgitster
authored andcommitted
rev-parse: documentation adjustment - mention remote tracking with @{u}
The documentation explained the conversion from remote branch path to local tracking ref path for @{push}, but not for @{upstream}. Add the explanation to @{upstream}, and reference it in @{push} to avoid undue repetition. Signed-off-by: Tao Klerks <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dc8c8de commit 8cdab69

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Documentation/revisions.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8.
9696
before the current one.
9797

9898
'[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
99-
The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
100-
refers to the branch that the branch specified by branchname is set to build on
101-
top of (configured with `branch.<name>.remote` and
102-
`branch.<name>.merge`). A missing branchname defaults to the
103-
current one. These suffixes are also accepted when spelled in uppercase, and
104-
they mean the same thing no matter the case.
99+
A branch B may be set up to build on top of a branch X (configured with
100+
`branch.<name>.merge`) at a remote R (configured with
101+
`branch.<name>.remote`). B@{u} refers to the remote-tracking branch for
102+
the branch X taken from remote R, typically found at `refs/remotes/R/X`.
105103

106104
'[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
107105
The suffix '@\{push}' reports the branch "where we would push to" if
108106
`git push` were run while `branchname` was checked out (or the current
109-
`HEAD` if no branchname is specified). Since our push destination is
110-
in a remote repository, of course, we report the local tracking branch
111-
that corresponds to that branch (i.e., something in `refs/remotes/`).
107+
`HEAD` if no branchname is specified). Like for '@\{upstream\}', we report
108+
the remote-tracking branch that corresponds to that branch at the remote.
112109
+
113110
Here's an example to make it more clear:
114111
+

0 commit comments

Comments
 (0)