git/list[1] front-page[2] threads[3] people[4] search[5] about
 

More noise when parsing ref args?

From
Jan Krüger <jk@jk.gs>
Date
Feb 7, 2009, 15:48 UTC
Message-ID
<20090207164819.7150661a@perceptron>
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
Message 1 of 1 in “More noise when parsing ref args?”
  1. Jan KrügerFeb 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.