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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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.

>> 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.

> 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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]