Re: [PATCH] Hint at "checkout -p" in the "reset --patch <type>" error message
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Nov 25, 2010, 10:56 UTC
- Message-ID
- <m3mxox4qr3.fsf@localhost.localdomain>
- In-Reply-To
- <4CEE2472.5020901@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 17 quoted lines
> Štěpán Němec venit, vidit, dixit 23.11.2010 16:23:
>> Jeff King <peff@peff.net> writes:
>>> On Tue, Nov 23, 2010 at 03:20:58PM +0100, Štěpán Němec wrote:
>>>
>>>> diff --git a/builtin/reset.c b/builtin/reset.c
>>>> index 0037be4..fc530d2 100644
>>>> --- a/builtin/reset.c
>>>> +++ b/builtin/reset.c
>>>> @@ -309,7 +309,8 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
>>>>
>>>> if (patch_mode) {
>>>> if (reset_type != NONE)
>>>> - die("--patch is incompatible with --{hard,mixed,soft}");
>>>> + die("--patch is incompatible with --{hard,mixed,soft}\n"
>>>> + "(use \"git checkout -p\" to selectively discard changes in working directory)");
>>>> return interactive_reset(rev, argv + i, prefix);
>>>> }[...]
Show 5 quoted lines
> > 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.
Errrr... but we do have "verbosity level" config in the form of advice.* configuration variables.
-- Jakub Narebski Poland ShadeHawk on #git