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

Re: Please discuss: what "git push" should do when you do not say what to push?

From
ASAndrew Sayers <andrew-git@pileofstuff.org>
Date
Mar 17, 2012, 10:05 UTC
Message-ID
<4F6461D7.40303@pileofstuff.org>
In-Reply-To
<7vty1ndcoi.fsf@alter.siamese.dyndns.org>
On 17/03/12 05:22, Junio C Hamano wrote:
Show 42 quoted lines
> If the conclusion of the discussion is that we will change the default,
> the transition to the new default will go like this:
> 
>  1. An announcement message to let the user communities know about the
>     future change will be distributed in a way similar to the previous
>     request-for-discussion message was distributed.
> 
>  2. The first version of Git that is released after such an announcement
>     will start issuing a warning when you type "git push" to send the
>     matching branches to the default location unless you have configured
>     push.default variable.  The users who want to keep the current default
>     can do
> 
> 	$ git config push.default matching
> 
>     and the users who want to use different settings can do one of:
> 
> 	$ git config push.default current
> 	$ git config push.default upstream
> 	$ git config push.default nothing
> 
>     to silence this warning. The warning will be issued unless you do so,
>     to help those who missed the message #1.
> 
>  3. We wait for a few release cycles.
> 
>  4. The default changes.  If you do not configure push.default variable,
>     it no longer defaults to matching, but does something else (the choice
>     among the three other alternatives will be decided in the discussion).
>     The warning message will be reworded---instead of saying "will stop
>     being the 'matching' in the future", it will say "has changed to X".
> 
>  5. We wait for a few release cycles.
> 
>  6. The warning is removed.
> 
> A typical release cycle lasts for 8-10 weeks.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Unfortunately, "a few release cycles" strikes me as a rather hopeful description. For example, a user installing the new Ubuntu LTS release (due out next month) would feel completely justified in not upgrading until 2017, whereas the rest of us would get rather bored disabling the same old warning in every new repo we create for the next five years.

Could I suggest when a user inits/clones a new repository using a post-change version of git, we do an automatic `git config push.warned_about_default_change true`, then warn forevermore when users push from a repo with neither that option nor a push.default? This will warn existing users with arbitrarily long upgrade cycles, and reduce the amount of noise during the (necessarily) already noisy first days of a new repo.

FWIW, I've been stung by the old behaviour and think the change of default is a great idea, but have nothing more useful to add :)

	- Andrew
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 43 in “Please discuss: what "git push" should do when you do not say what to push?”
  1. Junio C HamanoMar 17, 2012
  2. Junio C HamanoMar 17, 2012
  3. Andrew SayersMar 17, 2012
  4. Junio C HamanoMar 18, 2012
  5. Ævar Arnfjörð BjarmasonMar 18, 2012
  6. Junio C HamanoMar 19, 2012
  7. Sebastien DoucheMar 19, 2012
  8. Andrew SayersMar 19, 2012
  9. Junio C HamanoMar 19, 2012
  10. demerphqMar 19, 2012
  11. Junio C HamanoMar 19, 2012
  12. Andreas EricssonMar 20, 2012
  13. Andrew SayersMar 19, 2012
  14. Junio C HamanoMar 19, 2012
  15. Andrew SayersMar 20, 2012
  16. Junio C HamanoMar 20, 2012
  17. Andrew SayersMar 20, 2012
  18. Junio C HamanoMar 21, 2012
  19. Martin LanghoffMar 20, 2012
  20. Junio C HamanoMar 20, 2012
  21. Martin LanghoffMar 20, 2012
  22. Jakub NarebskiMar 20, 2012
  23. Summary of discussion on "git push" default changeJunio C Hamano, Mar 21, 2012
  24. Matthieu MoyMar 21, 2012
  25. Joey HessMar 17, 2012
  26. Junio C HamanoMar 19, 2012
  27. fREW SchmidtMar 17, 2012
  28. H. Peter AnvinMar 18, 2012
  29. Marcus D. HanwellMar 18, 2012
  30. Sebastian SchuberthMar 18, 2012
  31. Peter KreftingMar 19, 2012
  32. Letting remote repositories override local configurationJonathan Nieder, Mar 19, 2012
  33. Peter KreftingMar 19, 2012
  34. Kevin BallardMar 19, 2012
  35. Antony MaleMar 20, 2012
  36. Jakub NarebskiMar 20, 2012
  37. Antony MaleMar 20, 2012
  38. Nathan GrayMar 20, 2012
  39. Ben TebulinMar 20, 2012
  40. Ben TebulinMar 20, 2012
  41. Ben TebulinMar 20, 2012
  42. Ben TebulinMar 20, 2012
  43. Filipe FernandesMar 20, 2012

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.