git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: "Michael J Gruber" <git@drmicha.warpmail.net>,
	"Štěpán Němec" <stepnem@gmail.com>, "Jeenu V" <jeenuv@gmail.com>,
	knittl <knittl89@googlemail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Hint at "checkout -p" in the "reset --patch <type>" error message
Date: Thu, 25 Nov 2010 11:14:46 -0500	[thread overview]
Message-ID: <20101125161446.GA24426@sigill.intra.peff.net> (raw)
In-Reply-To: <vpqbp5diei5.fsf@bauges.imag.fr>

On Thu, Nov 25, 2010 at 04:56:02PM +0100, Matthieu Moy wrote:

> > The man page for git-reset points at git-checkout already.
> >
> > Until we have a "verbosity level" config across all commands, I don't
> > favor adding a lot of hints to command error messages.
> 
> I agree for "regular output", but this case is an error message that
> users should never see. If you see the message, it means you tried a
> command that doesn't exist, and I can't imagine a case where this
> would be disturbing to get an informative message pointing to the
> right command.

I have to agree.  When I introduced advice.*, I had initially intended
to have "advice.all" or similar, so expert users could shut off the
verbose warnings.

But I found that I didn't really want it. Most of the advice is for
messages like these that you just don't see that often, and the extra
line of output is simply not that big a deal. For messages that you _do_
see every day (e.g., the help in "git status"), it is not so cumbersome
to set the proper config option.

Which isn't to say I would be against "advice.all" (or even
advice.commandSuggestions) if somebody submitted a patch for it. I just
don't want it personally.

And I don't think any of this needs to hold up Štěpán's patch[1]. What has
happened in the past is something like:

  1. Somebody introduces new messages. The patch makes it into next.

  2. A developer gets annoyed and creates a patch for advice.whatever.

  3. That patch goes on the appropriate topic and they make it into the
     release together.

which makes sense to me. Then we know the patch in (2) is not just
bikeshedding, but actually fixes somebody's annoyance. :)

-Peff

[1] Don't take this as an endorsement of the patch. I think the intent
is good, but I haven't reviewed it carefully to make sure "git reset -p
--mixed" actually works as advertised. Today is American Thanksgiving,
so I probably won't get to it for a few days.

      reply	other threads:[~2010-11-25 16:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  9:11 Git reset -p on working tree Jeenu V
2010-11-23  9:20 ` knittl
2010-11-23 10:26   ` Jeenu V
2010-11-23 10:32     ` Jeenu V
2010-11-23 10:58       ` knittl
2010-11-23 13:00         ` Jeenu V
2010-11-23 14:20           ` [PATCH] Hint at "checkout -p" in the "reset --patch <type>" error message Štěpán Němec
2010-11-23 14:59             ` Jeff King
2010-11-23 15:23               ` Štěpán Němec
2010-11-25  8:55                 ` Michael J Gruber
2010-11-25 10:56                   ` Jakub Narebski
2010-11-25 13:10                     ` Michael J Gruber
2010-11-25 15:56                   ` Matthieu Moy
2010-11-25 16:14                     ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101125161446.GA24426@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jeenuv@gmail.com \
    --cc=knittl89@googlemail.com \
    --cc=stepnem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).