diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:19 -0800 |
commit | 33a2eeaeade52afee9fb9ffdd2ae995acf3b7e4e (patch) | |
tree | c46721ce09684b2466098d67c97c9781769f1b5e | |
parent | Merge branch 'jk/sanity' (diff) | |
parent | send-email: ask confirmation if given encoding name is very short (diff) | |
download | tgif-33a2eeaeade52afee9fb9ffdd2ae995acf3b7e4e.tar.xz |
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
-rwxr-xr-x | git-send-email.perl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 3092ab356c..848f17623a 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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"); } |