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

Re: [PATCH] Documentation: add a planning document for the next CLI revamp

From
Jeff King <peff@peff.net>
Date
Nov 5, 2008, 03:05 UTC
Message-ID
<20081105030525.GC20907@coredump.intra.peff.net>
In-Reply-To
<7vr65rqnoj.fsf@gitster.siamese.dyndns.org>
On Tue, Nov 04, 2008 at 11:46:36AM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> These days, people who would want the maching behaviour can explicitly ask
> for it, so there is one less reason to resist changing the default
> (i.e. earlier explicitly askinf for "matching" was impossible, but now we
> can).  The remaining reason of resistance is pure inertia (i.e. not
> changing the behaviour of the command only because you upgraded your git),
> and the only way to address it is to start issuing the warning when "git
> push" or "git push $there" is used and the matching behaviour was chosen
> without configuration (i.e. no "remote.<there>.push = :"), and keep it
> that way for two release cycles, and finally change the default.

Hmm. It really seems to me that there are two desires for push behavior, based on particular workflows. I.e., some people seem to want the matching behavior by default, and others want to push the current branch.

And we already can control that via configuration of the refspec. So any argument that "git push should do the same thing even on somebody else's setup" is already wrong. But I do think Junio has a good point, which is that there is going to be confusion if upgrading git suddenly causes "git push" to do something else.

So why not take one step back in the behavior change? We can set up the "push just this branch" refspec during clone, which will leave existing repositories untouched. And to make things even gentler, we can start with opt-in to the clone feature, notify users via the release notes (which, as we have established, EVERYONE reads), and then decide if and when to switch the option on by default.

So something like a "remote.push" config option, the value of which gets added to newly created remotes (including those created on clone). It would default to ":", but you could easily set "git config remote.push HEAD" to get the other behavior.

No, this doesn't get rid of the eventual need to choose whether to switch the default. But I think it eases us into it a little more. And I think such an option is a lot more generally applicable than a "default push to matching versus HEAD" option.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 16 of 25 in “Re: [PATCH] Documentation: add a planning document for the next CLI revamp”
  1. Jeff KingOct 31, 2008
  2. Sam VilainOct 31, 2008
  3. Pierre HabouzitOct 31, 2008
  4. Jeff KingNov 2, 2008
  5. Theodore TsoNov 2, 2008
  6. Johannes SchindelinOct 31, 2008
  7. Jeff KingNov 2, 2008
  8. Jeff KingNov 2, 2008
  9. Junio C HamanoNov 2, 2008
  10. Sam VilainNov 3, 2008
  11. Jakub NarebskiNov 3, 2008
  12. Sverre RabbelierNov 3, 2008
  13. Dmitry PotapovNov 4, 2008
  14. Sam VilainNov 4, 2008
  15. Junio C HamanoNov 4, 2008
  16. Jeff KingNov 5, 2008
  17. Junio C HamanoNov 5, 2008
  18. Dmitry PotapovNov 5, 2008
  19. Jeff KingNov 3, 2008
  20. Jeff KingNov 3, 2008
  21. Pierre HabouzitNov 3, 2008
  22. Junio C HamanoNov 3, 2008
  23. Pierre HabouzitNov 4, 2008
  24. Junio C HamanoNov 4, 2008
  25. Jeff KingNov 4, 2008

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.