summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-14 08:15:36 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-14 08:15:36 -0800
commit94383a813570c254101ffd729dd8251db5fe8044 (patch)
treeb93bb338d5b3f9efb84062aa3e304928c6094e9f /git-send-email.perl
parent94702dd1ac27618b60198f7c8bceafaaaf7743e2 (diff)
parent6310071abfdf7a925b41a131d518d7636daa7259 (diff)
downloadgit-94383a813570c254101ffd729dd8251db5fe8044.tar.gz
Merge branch 'nz/send-email-headers-are-case-insensitive'
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
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl10
1 files changed, 5 insertions, 5 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 94c7f76a15..be809e5b59 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1285,10 +1285,10 @@ foreach my $t (@files) {
}
if (defined $input_format && $input_format eq 'mbox') {
- if (/^Subject:\s+(.*)$/) {
+ if (/^Subject:\s+(.*)$/i) {
$subject = $1;
}
- elsif (/^From:\s+(.*)$/) {
+ elsif (/^From:\s+(.*)$/i) {
($author, $author_encoding) = unquote_rfc2047($1);
next if $suppress_cc{'author'};
next if $suppress_cc{'self'} and $author eq $sender;
@@ -1296,14 +1296,14 @@ foreach my $t (@files) {
$1, $_) unless $quiet;
push @cc, $1;
}
- elsif (/^To:\s+(.*)$/) {
+ elsif (/^To:\s+(.*)$/i) {
foreach my $addr (parse_address_line($1)) {
printf("(mbox) Adding to: %s from line '%s'\n",
$addr, $_) unless $quiet;
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'});
@@ -1325,7 +1325,7 @@ foreach my $t (@files) {
elsif (/^Message-Id: (.*)/i) {
$message_id = $1;
}
- elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
+ elsif (!/^Date:\s/i && /^[-A-Za-z]+:\s+\S/) {
push @xh, $_;
}