1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 21:06:11 +02:00

git-send-email: avoid duplicate message-ids

We used to unconditionally add a message-id to the outgoing
email without bothering to check if it already had one.
Instead, let's use the existing one.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2007-12-17 15:51:34 -05:00 committed by Junio C Hamano
parent 6851162adf
commit 4f3d37035a

View File

@ -527,7 +527,7 @@ sub send_message
$ccline = "\nCc: $cc";
}
my $sanitized_sender = sanitize_address($sender);
make_message_id();
make_message_id() unless defined($message_id);
my $header = "From: $sanitized_sender
To: $to${ccline}
@ -643,6 +643,9 @@ sub send_message
}
push @xh, $_;
}
elsif (/^Message-Id: (.*)/i) {
$message_id = $1;
}
elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
push @xh, $_;
}
@ -728,6 +731,7 @@ sub send_message
$references = "$message_id";
}
}
$message_id = undef;
}
if ($compose) {