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>

Tao Klerks committed Jun 23, 2022 at 05:01 UTC 8cdab69d967ec826ed258e31a26c8cb4720ffdca
1 file changed +6 -9
Documentation/revisions.txt
+6 -9
@@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8.
96 before the current one.
97
98 '[<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`.
103
104 '[<branchname>]@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
105 The suffix '@\{push}' reports the branch "where we would push to" if
106 `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.
109 +
110 Here's an example to make it more clear:
111 +