Merge branch 'nz/send-email-headers-are-case-insensitive'
authorJunio C Hamano <gitster@pobox.com>
Mon, 14 Jan 2013 16:15:36 +0000 (08:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jan 2013 16:15:36 +0000 (08:15 -0800)
When user spells "cc:" in lowercase in the fake "header" in the
trailer part, send-email failed to pick up the addresses from
there. As e-mail headers field names are case insensitive, this
script should follow suit and treat "cc:" and "Cc:" the same way.

* nz/send-email-headers-are-case-insensitive:
  git-send-email: treat field names as case-insensitively

1  2 
git-send-email.perl

index 94c7f76a156f1eaa4c622db267710f2982cf7826,7198d2ec9ac3ae3852decc9eba994a03f50294c3..be809e5b59394a4fd2f4f2b73cad6bac47a39600
@@@ -1300,10 -1242,10 +1300,10 @@@ foreach my $t (@files) 
                                foreach my $addr (parse_address_line($1)) {
                                        printf("(mbox) Adding to: %s from line '%s'\n",
                                                $addr, $_) unless $quiet;
 -                                      push @to, sanitize_address($addr);
 +                                      push @to, $addr;
                                }
                        }
-                       elsif (/^Cc:\s+(.*)$/) {
+                       elsif (/^Cc:\s+(.*)$/i) {
                                foreach my $addr (parse_address_line($1)) {
                                        if (unquote_rfc2047($addr) eq $sender) {
                                                next if ($suppress_cc{'self'});