On Thu, Feb 05, 2015 at 12:17:15PM -0800, Junio C Hamano wrote: > > Would "length() > 1" be enough[1]? Or are people really typing "yes" and > > not just "y"? > > > > I cannot imagine a charset name that is smaller than two characters. It > > may be that there are none smaller than 4, and we could cut it off > > there. Googling around for some lists of common charsets, it seems like > > that might be plausible (but not any larger; "big5" is 4 characters, and > > people may spell "utf8" without the hyphen). > > > > -Peff > > > > [1] Of course, to match the existing regex code, we may want to spell > > this as "/../" or "/..../". > > Perhaps. Just in case there were shorter ones, something like this > with confirm_only to allow them to say "Yes, I do mean 'xx'"? > > git-send-email.perl | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/git-send-email.perl b/git-send-email.perl > index 3092ab3..848f176 100755 > --- a/git-send-email.perl > +++ b/git-send-email.perl > @@ -752,6 +752,7 @@ sub file_declares_8bit_cte { > print " $f\n"; > } > $auto_8bit_encoding = ask("Which 8bit encoding should I declare [UTF-8]? ", > + valid_re => qr/.{4}/, confirm_only => 1, > default => "UTF-8"); > } Yes, I think leaving an escape hatch is a good idea, just in case. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html