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

Re: [PATCH 3/3] remote: introduce and fill branch->pushremote

From
Jeff King <peff@peff.net>
Date
Jan 13, 2014, 18:59 UTC
Message-ID
<20140113185946.GA30279@sigill.intra.peff.net>
In-Reply-To
<CALkWK0ncSLza3Q0PSZ0oTZqB2YxjgGSqA7QYxk2+rN_77BKZMA@mail.gmail.com>
On Mon, Jan 13, 2014 at 04:52:52PM +0530, Ramkumar Ramachandra wrote:
Show 9 quoted lines
> Not sure I understand what the problem is. Let's say we have two
> branches: "master", and "side" with remote.pushdefault = ram,
> branch.*.remote = origin, and branch.side.pushremote = peff. Now, when
> I query master's pushremote, I get "ram" and when I query side's
> pushremote, I get "peff"; all the logic for falling-back from
> branch.*.pushremote to remote.pushdefault to branch.*.remote is in
> branch_get(), so I need to do nothing extra on the caller-side. From
> the caller's perspective, why does it matter if the pushremote of a
> particular branch is due to branch.*.pushremote or remote.pushdefault?

Imagine your HEAD is at "side". What should "master@{publish}" produce? I would argue "ram/master". Where does "ram" come from in your code?

It does not matter for actually pushing, because to do a non-default push, you must always specify a remote. But "@{publish}" will ask the question "even if I am on 'side' now, what would happen if I were to default-push on 'master'?".

-Peff
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 7 of 9 in “Minor preparation for @{publish}”
  1. 0/3 Minor preparation for @{publish}Ramkumar Ramachandra, Jan 12, 2014
  2. 1/3 t1507 (rev-parse-upstream): fix typo in test titleRamkumar Ramachandra, Jan 12, 2014
  3. 2/3 interpret_branch_name: factor out upstream handlingRamkumar Ramachandra, Jan 12, 2014
  4. 3/3 remote: introduce and fill branch->pushremoteRamkumar Ramachandra, Jan 12, 2014
  5. Jeff KingJan 13, 2014
  6. Ramkumar RamachandraJan 13, 2014
  7. Jeff KingJan 13, 2014
  8. Junio C HamanoJan 13, 2014
  9. Jeff KingJan 13, 2014

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.