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

Re: [PATCH] push: start warning upcoming default change for push.default

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 20, 2012, 18:24 UTC
Message-ID
<vpqpq8t96zw.fsf@bauges.imag.fr>
In-Reply-To
<7vehp9x3yz.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> I am not sure who this wants to help.

The target is for people who may use different versions of Git (e.g. several installed git on the same machine, several machine, or worse, several machines with a shared $HOME/.gitconfig). This includes me.

For these people, setting push.default=simple is basically impossible since Git errors out when encountering such setting (it's not ignored, it really makes Git die).

Show 7 quoted lines
> For people who want to anticipate the future, using anything but
> 'simple' is not living in the future and waiting for an additional
> pain coming from the differences between current and simple. If
> current and simple are similar enough that their differences do not
> matter, why wait for simple to be available everywhere and switch the
> default to it, instead of using current as the default in the first
> place?

'simple' is an improvement over 'current' as a default, especially for beginners, but 'current' is already reasonably good.

So, the long term goal is really to switch to 'simple', but people who use different versions of Git won't be able to use it before a few years. These people have several options:

1) Keep push.default unset. This is not acceptable because they don't
   want the big fat warning each time they push.
2) Set push.default to 'matching', to keep the old behavior and squelsh
   the warning. If they go this way, they will never see the default
   change.
3) Set push.default to 'current', in which case they have the same
   behavior as 'simple', except for the safety feature of 'simple'
   (refuse to push when the name doesn't match the upstream). They can't
   expect anything better anyway since they are sometimes using a
   machine which doesn't support 'simple' anyway.

To me, option 3) clearly seems to be the best option. I don't understand whether you would advise 1), 2), or maybe a 4) that I would have missed.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 15 in “What's cooking in git.git (Jun 2012, #05; Tue, 19)”
  1. Junio C HamanoJun 19, 2012
  2. push: start warning upcoming default change for push.defaultMatthieu Moy, Jun 20, 2012
  3. Junio C HamanoJun 20, 2012
  4. Matthieu MoyJun 20, 2012
  5. Junio C HamanoJun 20, 2012
  6. Matthieu MoyJun 20, 2012
  7. Junio C HamanoJun 20, 2012
  8. Matthieu MoyJun 21, 2012
  9. Junio C HamanoJun 21, 2012
  10. Matthieu MoyJun 21, 2012
  11. Junio C HamanoJun 21, 2012
  12. Junio C HamanoJun 21, 2012
  13. Matthieu MoyJun 22, 2012
  14. Junio C HamanoJun 22, 2012
  15. push: start warning upcoming default change for push.defaultMatthieu Moy, Jun 24, 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.