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

Re: [BUG] git restore: typo in error message "could not resolve ource"

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2025, 13:19 UTC
Message-ID
<xmqqbjjqslgq.fsf@gitster.g>
In-Reply-To
<aUkx2XYCP75GrCsS@fruit.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 7 quoted lines
> So I think this is functioning as designed and isn't actually a typo in
> Git.  The code appears to be in `builtin/checkout.c`:
>
>     builtin/checkout.c:                     die(_("could not resolve %s"), opts->from_treeish);
>
> That shows that it prints "could not resolve" and then the thing it
> tried to resolve as a branch.
Hilarious.

We probably should give a pair of quotes around '%s' like other messages, and that is what CodingGuidelines asks us to do. In the section of "Error Messages", we find this.

 - Enclose the subject of an error inside a pair of single quotes,
   e.g. `die(_("unable to open '%s'"), path)`.
Thanks.
Previous: brian m. carlsonNext: brian m. carlson
Message 3 of 5 in “[BUG] git restore: typo in error message "could not resolve ource"”
  1. Zhelyo ZhelevDec 22, 2025
  2. brian m. carlsonDec 22, 2025
  3. Junio C HamanoDec 22, 2025
  4. checkout: quote invalid treeish in error messagebrian m. carlson, Dec 24, 2025
  5. Junio C HamanoDec 24, 2025

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.