Merge branch 'sb/send-email-use-to-from-input'
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Oct 2010 05:02:03 +0000 (22:02 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Oct 2010 05:02:03 +0000 (22:02 -0700)
* sb/send-email-use-to-from-input:
  send-email: Don't leak To: headers between patches
  send-email: Use To: headers in patch files

Conflicts:
git-send-email.perl

1  2 
git-send-email.perl
t/t9001-send-email.sh

index 196efcd5e42a0a61726f26d471cb88fed19aec13,7f9eacd16c0b195fab058dbe4215cf35b43d2465..f304ef913ecde17db0ad7ad4c57ad52028abc9a3
@@@ -218,12 -210,10 +218,12 @@@ my %config_bool_settings = 
  my %config_settings = (
      "smtpserver" => \$smtp_server,
      "smtpserverport" => \$smtp_server_port,
 +    "smtpserveroption" => \@smtp_server_options,
      "smtpuser" => \$smtp_authuser,
      "smtppass" => \$smtp_authpass,
 -      "smtpdomain" => \$smtp_domain,
 +    "smtpdomain" => \$smtp_domain,
-     "to" => \@to,
+     "to" => \@initial_to,
 +    "tocmd" => \$to_cmd,
      "cc" => \@initial_cc,
      "cccmd" => \$cc_cmd,
      "aliasfiletype" => \$aliasfiletype,
@@@ -281,8 -271,7 +281,8 @@@ $SIG{INT}  = \&signal_handler
  my $rc = GetOptions("sender|from=s" => \$sender,
                      "in-reply-to=s" => \$initial_reply_to,
                    "subject=s" => \$initial_subject,
-                   "to=s" => \@to,
+                   "to=s" => \@initial_to,
 +                  "to-cmd=s" => \$to_cmd,
                    "no-to" => \$no_to,
                    "cc=s" => \@initial_cc,
                    "no-cc" => \$no_cc,
@@@ -734,9 -711,9 +734,9 @@@ if (!defined $sender) 
        $prompting++;
  }
  
- if (!@to && !defined $to_cmd) {
 -if (!@initial_to) {
++if (!@initial_to && !defined $to_cmd) {
        my $to = ask("Who should the emails be sent to? ");
-       push @to, parse_address_line($to) if defined $to; # sanitized/validated later
+       push @initial_to, parse_address_line($to) if defined $to; # sanitized/validated later
        $prompting++;
  }
  
Simple merge