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

Re: [RFC/PATCH] Introduce remote.pushdefault

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2013, 06:10 UTC
Message-ID
<7vobeisgip.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0m2N=D47WJLk1F4j1GsGGWHyfxVF_WGXBbG3vyrfQ-oLA@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> How will adding remote.pushdefault have any
> impact, unless I explicitly remove this branch-specific remote
> configuration?  Besides, without branch.<name>.remote configured, I
> can't even pull and expect changes to be merged.

If the triangle topology is the norm for your project, I would expect that it would be pretty common to have all of your branches pull from one place and have all of them push to another place. In the central repository workflow, it is very common that all of your branches pull from one place and all of them push to the same place.

In the bigger picture, forcing to set the branch specific remote is a mistake in the first place; in the longer term, you should be able to say "My project uses the central repository workflow" once and you should be able to pull without branch.master.remote; just record where the default "origin" for all branches is.

I think the per-branch branch.*.pushremote is actively making things worse by repeating the same mistake for the triangle topology. You should be able to say "My project uses the triangle workflow" once and specify two remotes, where you pull from and where you push to, no?

A per-branch override, be it branch.*.remote or brnach.*.pushremote, is useful to give an escape hatch in order to handle special cases with additional flexibility. But making it the sole mechanism and forcing the user to repeat the same "which remote does it use" all over the place does not sound like a solid engineering.

Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 9 of 18 in “Introduce branch.<name>.pushremote”
  1. Introduce branch.<name>.pushremoteRamkumar Ramachandra, Feb 8, 2013
  2. Junio C HamanoFeb 8, 2013
  3. Introduce remote.pushdefaultRamkumar Ramachandra, Feb 8, 2013
  4. Junio C HamanoFeb 8, 2013
  5. Ramkumar RamachandraFeb 9, 2013
  6. Ramkumar RamachandraMar 17, 2013
  7. Jeff KingMar 17, 2013
  8. Ramkumar RamachandraMar 18, 2013
  9. Junio C HamanoMar 17, 2013
  10. Junio C HamanoFeb 8, 2013
  11. Ramkumar RamachandraFeb 9, 2013
  12. Junio C HamanoFeb 9, 2013
  13. Ramkumar RamachandraFeb 10, 2013
  14. BlindFeb 11, 2013
  15. Ramkumar RamachandraFeb 19, 2013
  16. BlindFeb 19, 2013
  17. Ramkumar RamachandraFeb 19, 2013
  18. BlindFeb 19, 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.