Re: [PATCH] Hint at "checkout -p" in the "reset --patch <type>" error message

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

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

>>>>  	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);
>>>>  	}
>>>
>
> 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.

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