Merge branch 'jc/send-email-sensible-encoding'

"git send-email" used to accept a mistaken "y" (or "yes") as an
answer to "What encoding do you want to use [UTF-8]? " without
questioning.  Now it asks for confirmation when the answer looks
too short to be a valid encoding name.

* jc/send-email-sensible-encoding:
  send-email: ask confirmation if given encoding name is very short
This commit is contained in:
Junio C Hamano 2015-02-25 15:40:19 -08:00
commit 33a2eeaead

View File

@ -752,6 +752,7 @@ if (!defined $auto_8bit_encoding && scalar %broken_encoding) {
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");
}