From: Junio C Hamano Date: Sat, 15 Sep 2012 04:32:07 +0000 (-0700) Subject: Merge branch 'sb/send-email-reconfirm-fix' into maint X-Git-Tag: v1.7.12.1~11 X-Git-Url: https://www.git.lorimer.id.au/gitweb.git/diff_plain/c13a5aca5da4e94e69d5432aeeafd123221c79e3?hp=448e3700a0eb5acff5e52882b7941e0cfee6c5f3 Merge branch 'sb/send-email-reconfirm-fix' into maint * sb/send-email-reconfirm-fix: send-email: initial_to and initial_reply_to are both optional --- diff --git a/git-send-email.perl b/git-send-email.perl index 607137b9aa..aea66a0d47 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -759,7 +759,8 @@ sub file_declares_8bit_cte { } if (!@initial_to && !defined $to_cmd) { - my $to = ask("Who should the emails be sent to? ", + my $to = ask("Who should the emails be sent to (if any)? ", + default => "", valid_re => qr/\@.*\./, confirm_only => 1); push @initial_to, parse_address_line($to) if defined $to; # sanitized/validated later $prompting++; @@ -786,7 +787,8 @@ sub expand_one_alias { if ($thread && !defined $initial_reply_to && $prompting) { $initial_reply_to = ask( - "Message-ID to be used as In-Reply-To for the first email? ", + "Message-ID to be used as In-Reply-To for the first email (if any)? ", + default => "", valid_re => qr/\@.*\./, confirm_only => 1); } if (defined $initial_reply_to) {