From: Junio C Hamano Date: Wed, 10 Jun 2009 07:17:11 GMT Subject: [PATCH 4/6] send-email: fix threaded mails without chain-reply-to Message-ID: <7vd49ctv60.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vhbyo1vr7.fsf@alter.siamese.dyndns.org> From: Markus Heidelberg Date: Sun, 7 Jun 2009 23:40:54 +0200 An earlier commit 15da108 ("send-email: 'References:' should only reference what is sent", 2009-04-13) broke logic to set up threading information for the next message by rewriting "!" to "not" without understanding the precedence rules of the language. Namely, ! defined $reply_to || length($reply_to) == 0 was changed to not defined $reply_to || length($reply_to) == 0 which is not (defined $reply_to || length($reply_to) == 0) and different from what was intended, which is (not defined $reply_to) || (length($reply_to) == 0) Signed-off-by: Markus Heidelberg Signed-off-by: Junio C Hamano --- * Applies on top of 15da108 to fix the breakage there. git-send-email.perl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 43f956b..c55b045 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -1135,7 +1135,8 @@ foreach my $t (@files) { my $message_was_sent = send_message(); # set up for the next message - if ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) { + if ($message_was_sent && + ($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) { $reply_to = $message_id; if (length $references > 0) { $references .= "\n $message_id"; -- 1.6.3.2.214.gf4f78e