git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] rev-parse: Clarify documentation of @{upstream} syntax

From
Kacper Kornet <draenog@pld-linux.org>
Date
Mar 16, 2013, 18:51 UTC
Message-ID
<1363459903-32358-1-git-send-email-draenog@pld-linux.org>

git-rev-parse interprets string in string@{upstream} as a name of a branch not a ref. For example refs/heads/master@{upstream} looks for an upstream branch that is merged by git-pull to ref refs/heads/refs/heads/master not to refs/heads/master. However the documentation could misled a user to believe that the string is interpreted as ref.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
---
 Documentation/revisions.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 678d175..314e25d 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -88,10 +88,10 @@ some output processing may assume ref names in UTF-8.
   The construct '@\{-<n>\}' means the <n>th branch checked out
   before the current one.
 
-'<refname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
-  The suffix '@\{upstream\}' to a ref (short form '<refname>@\{u\}') refers to
-  the branch the ref is set to build on top of.  A missing ref defaults
-  to the current branch.
+'<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.  A missing branchname defaults to the current one.
 
 '<rev>{caret}', e.g. 'HEAD{caret}, v1.5.1{caret}0'::
   A suffix '{caret}' to a revision parameter means the first parent of
-- 
1.8.2
Next: Eric Sunshine
Message 1 of 3 in “rev-parse: Clarify documentation of @{upstream} syntax”
  1. rev-parse: Clarify documentation of @{upstream} syntaxKacper Kornet, Mar 16, 2013
  2. Eric SunshineMar 17, 2013
  3. t1507: Test that branchname@{upstream} is interpreted as branchKacper Kornet, Mar 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.