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

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 Dec 2025 22:19:17 +0900

"brian m. carlson" <[email-masked]> writes:

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