From: Rubén Justo Date: Wed, 22 May 2024 17:38:51 GMT Subject: Re: [PATCH v3] add-patch: enforce only one-letter response to prompts Message-ID: In-Reply-To: On Wed, May 22, 2024 at 10:14:23AM -0700, Junio C Hamano wrote: > + if (s->answer.len != 1 && (ch != 'g' && ch != '/')) { This "len!=1" introduces a nice dose of sanity in the UI. > + error(_("only one letter is expected, got '%s'"), s->answer.buf); Here, perhaps you want to do: err(s, _("Only one letter is expected, got '%s'"), s->answer.buf);