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

Re: [PATCH] push: shorten "push.default is unset" warning message

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Feb 23, 2016, 19:47 UTC
Message-ID
<vpqd1rngqf3.fsf@anie.imag.fr>
In-Reply-To
<xmqqtwkz1c4b.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> The punchline of that question is:
>
>     I can obviously set it to one of the values mentioned, but what do
>     they mean? What's the difference between simple and matching?
>
> It tells us that "See 'git help config'" is not such an effective
> message to help such a user.
[ The teacher inside me speaks ]

Don't underestimate the ability to ignore any pointer to the doc from many users.

In many case, when a student comes to me scared about an error or warning message, I just ask the student to read the message to me. If it's in english, I sometimes have to add "so, what does this mean in French", and in many cases it's sufficient.

Show 9 quoted lines
>> Shorten the warning and mention only the way to remove the warning
>> without changing the behavior. Keep a pointer to the documentation so
>> that people willing to learn can still find the alternative behaviors
>> easily.
>
> While I admit that I usually am the most cautious one when dealing
> with any change, I am not sure if this rephrasing helps very much.
> As we saw, the sentence you kept, "See 'git help config'", is not
> effective in helping those stackoverflow users.

Right. But assuming someone who reads the complete message, I found that keeping only the first lines without a pointer to the doc make the text kind of mysterious:

  warning: push.default is unset; its default value has changed in Git 2.0 from
  'matching' to 'simple'. To squelch this message and adopt the new behavior, use:
  
    git config --global push.default simple

Alone, this really looks like a magic formula like "I'm showing you this warning just to bug you, but you can get rid of it with ...".

> If most people are happy with "simple" (and certainly that was the
> assumption and hope behind the transtion we made at 2.0), we may be
> better off removing the warning altogether.

To me, this is the plan. I have no strong objection in removing it completely, but I think it makes sense to keep a lightweight one for a while: if people use different machines with different Git versions (especially if they ever use a version in the interval 2.0 to 2.3 which claims to use simple but actually do not), then these people may appreciate an incentive to set push.default.

OTOH, if they use different Git versions, they will eventually get the message.

Show 6 quoted lines
> After all, push.default configuration is hardly the only case where
> there are other ways to use Git that may match the user's situation
> better, and we do not advertise "Oh by the way you can do things
> differently, study the manual" for any of them with a warning
> message like this.  Those who want to do different things know to
> seek settings to tweak.
I completely agree with this.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Jeff King
Message 3 of 11 in “push: shorten "push.default is unset" warning message”
  1. push: shorten "push.default is unset" warning messageMatthieu Moy, Feb 23, 2016
  2. Junio C HamanoFeb 23, 2016
  3. Matthieu MoyFeb 23, 2016
  4. Jeff KingFeb 24, 2016
  5. Philip OakleyFeb 23, 2016
  6. Matthieu MoyFeb 23, 2016
  7. Documentation/git-push: document that 'simple' is the defaultMatthieu Moy, Feb 23, 2016
  8. 0/2 Remove "push.default unset" warningMatthieu Moy, Feb 25, 2016
  9. 1/2 push: remove "push.default is unset" warning messageMatthieu Moy, Feb 25, 2016
  10. 2/2 Documentation/git-push: document that 'simple' is the defaultMatthieu Moy, Feb 25, 2016
  11. Jeff KingFeb 26, 2016

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.