Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:50:06

Michael J Gruber [off-list ref] writes:
quoted
quoted
quoted
 	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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help