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

Re: [RFC] rebase: use @{upstream} if no upstream specified

From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Date
Nov 20, 2010, 13:14 UTC
Message-ID
<AANLkTikKeGz=Wc4fBDO6NyNQgpJ9qu3zUKzVqWW+yzPN@mail.gmail.com>
In-Reply-To
<20101120041011.GA20725@sigill.intra.peff.net>
On Fri, Nov 19, 2010 at 11:10 PM, Jeff King <peff@peff.net> wrote:
Show 13 quoted lines
> On Fri, Nov 19, 2010 at 07:26:57PM -0500, Martin von Zweigbergk wrote:
>
>> Yes, I did try that and I noticed that it worked, but it helps to know
>> that it is not just by accident. I realize I was not very clear, but
>> what I really was wondering if there is any advantage to using
>> "git for-each-ref --format='%(upstream)' ${branch_name}" (as used by
>> git pull) as compared to "git rev-parse @{upstream}" as suggested by
>> Yann. ($branch_name in this case would be the current branch.)
>
> No, I don't think there is a reason to prefer one over the other these
> days. When the instance in git-parse-remote was written (e9460a6,
> 2009-06-12) @{upstream} did not yet exist (it came in 28fb843,
> 2009-09-10). So for-each-ref was the only way to get the informationa

Ah, I see. Now it is all clear. I should not have assumed that '%(upstream)' and '@{upstream}' were introduced at the same time. Thanks.

Previous: Jeff KingNext: Kevin Ballard
Message 7 of 11 in “[RFC] rebase: use @{upstream} if no upstream specified”
  1. Martin von ZweigbergkNov 12, 2010
  2. Yann DirsonNov 13, 2010
  3. Martin von ZweigbergkNov 17, 2010
  4. Jeff KingNov 19, 2010
  5. Martin von ZweigbergkNov 20, 2010
  6. Jeff KingNov 20, 2010
  7. Martin von ZweigbergkNov 20, 2010
  8. Kevin BallardNov 15, 2010
  9. Martin von ZweigbergkNov 15, 2010
  10. Jay SoffianNov 15, 2010
  11. Kevin BallardNov 15, 2010

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.