Browse Source

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 <tao@klerks.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Tao Klerks 3 years ago committed by Junio C Hamano
parent
commit
8cdab69d96
  1. 15
      Documentation/revisions.txt

15
Documentation/revisions.txt

@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8.
before the current one. before the current one.


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


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

Loading…
Cancel
Save