summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorRyan Anderson <rda@google.com>2006-05-29 12:30:12 -0700
committerJunio C Hamano <junkio@cox.net>2006-05-29 23:15:36 -0700
commit7ccf79274c03971b8884223b1950077582a7bf8a (patch)
treea64417ea1fc277d930d9b2a61037ecf2e9f06992 /git-send-email.perl
parent7484529d7f17d5bff1faefb007d604aba12a0e1b (diff)
downloadgit-7ccf79274c03971b8884223b1950077582a7bf8a.tar.gz
git-send-email: Add References: headers to emails, in addition to In-Reply-To:
Signed-off-by: Ryan Anderson <rda@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl13
1 files changed, 11 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 312a4ea2aa..ad8944dffc 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -303,7 +303,7 @@ EOT
}
# Variables we set as part of the loop over files
-our ($message_id, $cc, %mail, $subject, $reply_to, $message);
+our ($message_id, $cc, %mail, $subject, $reply_to, $references, $message);
sub extract_valid_address {
my $address = shift;
@@ -367,7 +367,11 @@ Date: $date
Message-Id: $message_id
X-Mailer: git-send-email $gitversion
";
- $header .= "In-Reply-To: $reply_to\n" if $reply_to;
+ if ($reply_to) {
+
+ $header .= "In-Reply-To: $reply_to\n";
+ $header .= "References: $references\n";
+ }
if ($smtp_server =~ m#^/#) {
my $pid = open my $sm, '|-';
@@ -482,6 +486,11 @@ foreach my $t (@files) {
# set up for the next message
if ($chain_reply_to || length($reply_to) == 0) {
$reply_to = $message_id;
+ if (length $references > 0) {
+ $references .= " $message_id";
+ } else {
+ $references = "$message_id";
+ }
}
make_message_id();
}