Re: [PATCH v3] add-patch: enforce only one-letter response to prompts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux