send-email: fix threaded mails without chain-reply-to
[gitweb.git] / git-send-email.perl
index 4c795a4b0310aa0d8081dcaea0a9d9593643e704..16d12e082b0a3baf361440739d77fc5664497e4e 100755 (executable)
@@ -1150,7 +1150,8 @@ sub send_message
        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";