Merge branch 'nz/send-email-headers-are-case-insensitive' into maint
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
This commit is contained in:
commit
cea1e2e94c
@ -1285,10 +1285,10 @@ foreach my $t (@files) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (defined $input_format && $input_format eq 'mbox') {
|
if (defined $input_format && $input_format eq 'mbox') {
|
||||||
if (/^Subject:\s+(.*)$/) {
|
if (/^Subject:\s+(.*)$/i) {
|
||||||
$subject = $1;
|
$subject = $1;
|
||||||
}
|
}
|
||||||
elsif (/^From:\s+(.*)$/) {
|
elsif (/^From:\s+(.*)$/i) {
|
||||||
($author, $author_encoding) = unquote_rfc2047($1);
|
($author, $author_encoding) = unquote_rfc2047($1);
|
||||||
next if $suppress_cc{'author'};
|
next if $suppress_cc{'author'};
|
||||||
next if $suppress_cc{'self'} and $author eq $sender;
|
next if $suppress_cc{'self'} and $author eq $sender;
|
||||||
@ -1296,14 +1296,14 @@ foreach my $t (@files) {
|
|||||||
$1, $_) unless $quiet;
|
$1, $_) unless $quiet;
|
||||||
push @cc, $1;
|
push @cc, $1;
|
||||||
}
|
}
|
||||||
elsif (/^To:\s+(.*)$/) {
|
elsif (/^To:\s+(.*)$/i) {
|
||||||
foreach my $addr (parse_address_line($1)) {
|
foreach my $addr (parse_address_line($1)) {
|
||||||
printf("(mbox) Adding to: %s from line '%s'\n",
|
printf("(mbox) Adding to: %s from line '%s'\n",
|
||||||
$addr, $_) unless $quiet;
|
$addr, $_) unless $quiet;
|
||||||
push @to, $addr;
|
push @to, $addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif (/^Cc:\s+(.*)$/) {
|
elsif (/^Cc:\s+(.*)$/i) {
|
||||||
foreach my $addr (parse_address_line($1)) {
|
foreach my $addr (parse_address_line($1)) {
|
||||||
if (unquote_rfc2047($addr) eq $sender) {
|
if (unquote_rfc2047($addr) eq $sender) {
|
||||||
next if ($suppress_cc{'self'});
|
next if ($suppress_cc{'self'});
|
||||||
@ -1325,7 +1325,7 @@ foreach my $t (@files) {
|
|||||||
elsif (/^Message-Id: (.*)/i) {
|
elsif (/^Message-Id: (.*)/i) {
|
||||||
$message_id = $1;
|
$message_id = $1;
|
||||||
}
|
}
|
||||||
elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
|
elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
|
||||||
push @xh, $_;
|
push @xh, $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user