summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2012-09-06 11:31:11 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-06 16:18:12 -0700
commit618374930ab0de78c3994a633ca5f26e286810cf (patch)
tree1d98bf65dabcca050014de960de53ba77fe2d42b /git-send-email.perl
parent51bbccfd1b4a9e2807413022c56ab05c835164fb (diff)
downloadgit-618374930ab0de78c3994a633ca5f26e286810cf.tar.gz
send-email: initial_to and initial_reply_to are both optional
We may pick up additional recipients from the format-patch output files we are sending, in which case it is perfectly valid to leave the @initial_to empty when the prompt asks. We may want to start a new discussion thread without replying to anything, and it is valid to leave $initial_reply_to empty. An earlier update to avoid y@example.com stuffed in address fields did not take these two cases into account. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e89729bf43..b1fb7e615f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -759,7 +759,8 @@ if (!defined $sender) {
}
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) {