More noise when parsing ref args?

From: Jan Krüger <hidden>
Date: 2016-06-15 22:46:07

Good day,

I heard a (quite valid) complaint on IRC about a confusing error
message. The command used was "git show <commit>:foo", where foo was a
working tree file in the CWD (a non-toplevel dir of the repository).
Obviously this couldn't have worked but the error message was the usual
"ambiguous argument" message output by verify_filename(). That message
doesn't really make clear the fact that the commit object was found but
the path wasn't. It's easy for someone with less experience to read the
message as "either the <commit> or the path suffix you gave was wrong".

It would be great adding another message that points out what exactly
went wrong in looking up the object, but that message would then appear
in plumbing. So what's the policy on adding new error messages to
plumbing? If it's a bad idea: I remember that a couple of months ago
some error handling code was changed to allow overloading messages from
porcelain. Can that be extended with a reasonable amount of effort?

-Jan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help