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

Re: [PATCH v3] push: Enhance unspecified push default warning

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2013, 18:32 UTC
Message-ID
<xmqqvc08yq4v.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAKYC+eLvx1vB1ZDqYK=7Dg68QuCojBdSAVQZMF6HBtfxu_b_aw@mail.gmail.com>
Greg Jacobson <coder5000@gmail.com> writes:
> Is there anything I could do to improve this patch?  Thank you.

My vague recollection is that we started from an excerpt from the documentation page, not unlike this patch attempts to, but because such an excerpt has to be less complete than the documentation for brevity's sake, it is bound to be an incorrect and/or misleading one, and decided that we are better off referring the users, who do want to choose something other than the default we chose, to the documentation.

Somebody cares to dig up the old discussion threads and post a few pointers?

Show 38 quoted lines
> On Fri, Oct 4, 2013 at 10:20 AM, Greg Jacobson <coder5000@gmail.com> wrote:
>> When the unset push.default warning message is displayed
>> this may be the first time many users encounter push.default.
>> Modified the warning message to explain in a compact
>> manner what push.default is and why it is being changed in
>> Git 2.0.  Also provided additional information to help users
>> decide if this change will affect their workflow.
>>
>> Signed-off-by: Greg Jacobson <coder5000@gmail.com>
>> ---
>>  builtin/push.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/builtin/push.c b/builtin/push.c
>> index 7b1b66c..5393e28 100644
>> --- a/builtin/push.c
>> +++ b/builtin/push.c
>> @@ -174,6 +174,15 @@ N_("push.default is unset; its implicit value is
>> changing in\n"
>>     "\n"
>>     "  git config --global push.default simple\n"
>>     "\n"
>> +   "When push.default is set to 'matching', git will push all local branches\n"
>> +   "to the remote branches with the same (matching) name.  This will no\n"
>> +   "longer be the default in Git 2.0 because a branch could be\n"
>> +   "unintentionally pushed to a remote.\n"
>> +   "\n"
>> +   "In Git 2.0 the new push.default of 'simple' will push only the current\n"
>> +   "branch to the same remote branch used by git pull.   A push will\n"
>> +   "only succeed if the remote and local branches have the same name.\n"
>> +   "\n"
>>     "See 'git help config' and search for 'push.default' for further
>> information.\n"
>>     "(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode\n"
>>     "'current' instead of 'simple' if you sometimes use older versions
>> of Git)");
>> --
>> 1.8.4.474.g128a96c.dirty
Previous: Greg JacobsonNext: Matthieu Moy
Message 3 of 20 in “push: Enhance unspecified push default warning”
  1. push: Enhance unspecified push default warningGreg Jacobson, Oct 4, 2013
  2. Greg JacobsonNov 3, 2013
  3. Junio C HamanoNov 4, 2013
  4. Matthieu MoyNov 5, 2013
  5. Matthieu MoyNov 5, 2013
  6. Junio C HamanoNov 6, 2013
  7. Junio C HamanoNov 6, 2013
  8. Junio C HamanoNov 6, 2013
  9. Matthieu MoyNov 6, 2013
  10. Jonathan NiederNov 6, 2013
  11. Matthieu MoyNov 7, 2013
  12. Junio C HamanoNov 7, 2013
  13. Matthieu MoyNov 7, 2013
  14. Junio C HamanoNov 8, 2013
  15. Junio C HamanoNov 8, 2013
  16. Marc BranchaudNov 8, 2013
  17. Junio C HamanoNov 11, 2013
  18. Jonathan NiederNov 11, 2013
  19. Marc BranchaudNov 11, 2013
  20. Matthieu MoyNov 11, 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.