Merge branch 'nz/send-email-headers-are-case-insensitive' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 21 Jan 2013 01:22:49 +0000 (17:22 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Jan 2013 01:22:49 +0000 (17:22 -0800)
When users spell "cc:" in lowercase in the fake "header" in the
trailer part, "git 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'});