summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d67114a)
raw | patch | inline | side by side (parent: d67114a)
author | Markus Heidelberg <markus.heidelberg@web.de> | |
Fri, 12 Jun 2009 10:51:41 +0000 (12:51 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Jun 2009 16:22:15 +0000 (09:22 -0700) |
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 <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history | |
t/t9001-send-email.sh | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index 4c795a4b0310aa0d8081dcaea0a9d9593643e704..16d12e082b0a3baf361440739d77fc5664497e4e 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
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";
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 4f67de3ac7f882836444ea46ba938341c7be22cf..8ab1a78bf59e063ca57bcee0bbf26edba0bec9ce 100755 (executable)
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
grep "In-Reply-To: <in-reply-id@example.com>"
'
-test_expect_failure 'threading but no chain-reply-to' '
+test_expect_success 'threading but no chain-reply-to' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \