From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Zhelyo Zhelev <zhelyo@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG] git restore: typo in error message "could not resolve ource"
Date: Mon, 22 Dec 2025 22:19:17 +0900 [thread overview]
Message-ID: <xmqqbjjqslgq.fsf@gitster.g> (raw)
In-Reply-To: <aUkx2XYCP75GrCsS@fruit.crustytoothpaste.net> (brian m. carlson's message of "Mon, 22 Dec 2025 11:56:09 +0000")
"brian m. carlson" <sandals@crustytoothpaste.net> 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.
next prev parent reply other threads:[~2025-12-22 13:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 9:16 [BUG] git restore: typo in error message "could not resolve ource" Zhelyo Zhelev
2025-12-22 11:56 ` brian m. carlson
2025-12-22 13:19 ` Junio C Hamano [this message]
2025-12-24 20:32 ` [PATCH] checkout: quote invalid treeish in error message brian m. carlson
2025-12-24 23:43 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbjjqslgq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=zhelyo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.