summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-02-25 15:40:19 -0800
committerJunio C Hamano <gitster@pobox.com>2015-02-25 15:40:19 -0800
commit33a2eeaeade52afee9fb9ffdd2ae995acf3b7e4e (patch)
treec46721ce09684b2466098d67c97c9781769f1b5e /git-send-email.perl
parent75b49bb181555b25d316bbe427ba7feedd2a58da (diff)
parent852a15d748034eec87adbee73a72689c8936fb8b (diff)
downloadgit-33a2eeaeade52afee9fb9ffdd2ae995acf3b7e4e.tar.gz
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
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl1
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");
}