Code

Merge branch 'sb/send-email-use-to-from-input' into next
authorJunio C Hamano <gitster@pobox.com>
Wed, 6 Oct 2010 20:50:10 +0000 (13:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Oct 2010 20:50:10 +0000 (13:50 -0700)
* sb/send-email-use-to-from-input:
  send-email: Don't leak To: headers between patches

Conflicts:
git-send-email.perl

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

index aef359451e61966beb48dccbf42ac66fc4d790bb,7f9eacd16c0b195fab058dbe4215cf35b43d2465..f68ed5a5d3208eb0669d7dc1289f40c567e077c7
@@@ -139,8 -134,11 +139,8 @@@ my $have_mail_address = eval { require 
  my $smtp;
  my $auth;
  
 -sub unique_email_list(@);
 -sub cleanup_compose_files();
 -
  # Variables we fill in automatically, or via prompting:
- my (@to,$no_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
+ my (@to,$no_to,@initial_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
        $initial_reply_to,$initial_subject,@files,
        $author,$sender,$smtp_authpass,$annotate,$compose,$time);
  
@@@ -215,12 -210,10 +215,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,
@@@ -278,8 -271,7 +278,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,
@@@ -731,9 -711,9 +731,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