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
Junio C Hamano <gitster@pobox.com>
Date
Jun 20, 2012, 19:51 UTC
Message-ID
<7v62alvk2e.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7va9zxvkyp.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Telling somebody who would blindly follow what was suggested to use
> 'current' is what bothers me.

That is (quoting the difference between the previous round and this one),

 static char warn_unspecified_push_default_msg[] =
 N_("push.default is unset; its implicit value is changing in\n"
    "Git 2.0 from 'matching' to 'simple'. To squelch this message\n"
    "and maintain the current behavior after the default changes, use:\n"
    "\n"
    "  git config --global push.default matching\n"
    "\n"
    "To squelch this message and adopt the new behavior now, use:\n"
    "\n"
    "  git config --global push.default simple\n"
    "\n"
-   "See 'git help config' and search for 'push.default' for further information.");
+   "See 'git help config' and search for 'push.default' for further information.\n"
+   "(the 'simple' mode was introduced in Git 1.7.11. Use 'current' instead if\n"
+   "you sometimes use older versions of Git)");

The latter half of the message is "To *adopt* the *new behaviour now*" but setting it to 'current' is not adopting the new behaviour.

Perhaps we should say more to help people decide which one to choose in this message.

    ... changing in Git 2.0 from 'matching' to 'simple'.
    'matching', which is the current default, pushes all branches
    that exist at the remote.  'simple', which will be the new
    default, pushes only the current branch to update the branch at
    the remote of the same name (the 'simple' mode is only available
    in Git 1.7.11 or newer; older versions of Git has a similar mode
    called 'current').
    You can squelch this message by picking your preferred default now,
    e.g. running one of these:
            git config push.default matching
            git config push.default simple
            git config push.default current
or something?
Previous: Matthieu MoyNext: Matthieu Moy
Message 7 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.