From: Tao Klerks Date: Thu, 23 Jun 2022 05:01:52 +0000 (+0000) Subject: rev-parse: documentation adjustment - mention remote tracking with @{u} X-Git-Tag: v2.37.2~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cdab69d967ec826ed258e31a26c8cb4720ffdca;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index f5f17b65a1..7fcfbcbac7 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -96,19 +96,16 @@ some output processing may assume ref names in UTF-8. before the current one. '[]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}':: - The suffix '@\{upstream\}' to a branchname (short form '@\{u\}') - refers to the branch that the branch specified by branchname is set to build on - top of (configured with `branch..remote` and - `branch..merge`). A missing branchname defaults to the - current one. These suffixes are also accepted when spelled in uppercase, and - they mean the same thing no matter the case. + A branch B may be set up to build on top of a branch X (configured with + `branch..merge`) at a remote R (configured with + `branch..remote`). B@{u} refers to the remote-tracking branch for + the branch X taken from remote R, typically found at `refs/remotes/R/X`. '[]@\{push\}', e.g. 'master@\{push\}', '@\{push\}':: The suffix '@\{push}' reports the branch "where we would push to" if `git push` were run while `branchname` was checked out (or the current - `HEAD` if no branchname is specified). Since our push destination is - in a remote repository, of course, we report the local tracking branch - that corresponds to that branch (i.e., something in `refs/remotes/`). + `HEAD` if no branchname is specified). Like for '@\{upstream\}', we report + the remote-tracking branch that corresponds to that branch at the remote. + Here's an example to make it more clear: +