[PATCH] rev-parse: documentation adjustment - mention remote tracking with @{u}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tao Klerks <tao@xxxxxxxxxx>

The documentation explained the conversion from remote branch path to
local tracking ref path for @{push}, but not for @{upstream}.

Add the note to @{upstream}, and reference it in @{push} to avoid undue
repetition.

Signed-off-by: Tao Klerks <tao@xxxxxxxxxx>
---
    rev-parse: documentation adjustment - mention remote tracking with @{u}
    
    Small clarification in the doc for git rev-parse.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1265%2FTaoK%2Ftao-upstreak-doc-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1265/TaoK/tao-upstreak-doc-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1265

 Documentation/revisions.txt | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index f5f17b65a12..33809036f04 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -97,18 +97,19 @@ some output processing may assume ref names in UTF-8.
 
 '[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
   The suffix '@\{upstream\}' to a branchname (short form '<branchname>@\{u\}')
-  refers to the branch that the branch specified by branchname is set to build on
-  top of (configured with `branch.<name>.remote` and
-  `branch.<name>.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.
+  refers to the remote branch that the branch specified by branchname
+  is set to build on top of (configured with `branch.<name>.remote` and
+  `branch.<name>.merge`). As `branch.<name>.merge` is the branch path on the
+  remote, it is first converted to a local tracking branch (i.e., something in
+  `refs/remotes/`). 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.
 
 '[<branchname>]@\{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 local tracking branch that corresponds to that remote branch.
 +
 Here's an example to make it more clear:
 +

base-commit: 5b71c59bc3b9365075e2a175aa7b6f2b0c84ce44
-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux