{"thread":{"id":"19727","subject":"[PATCH 1/6] send-email: fix a typo in a comment","startedAt":"2009-06-07T21:40:51Z","lastAt":"2009-06-12T10:51:42Z","messageCount":38,"participants":["Markus Heidelberg","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"115738","messageId":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":null,"subject":"[PATCH 0/6] fixes for git-send-email","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:51Z","receivedAt":"2009-06-07T21:40:51Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Markus Heidelberg (6):\n  send-email: fix a typo in a comment\n  add a test for git-send-email for threaded mails without\n    chain-reply-to\n  send-email: fix threaded mails without chain-reply-to\n  add a test for git-send-email for non-threaded mails\n  send-email: fix non-threaded mails\n  doc/send-email: clarify the behavior of --in-reply-to with\n    --no-thread\n\n Documentation/git-send-email.txt |    5 +++--\n git-send-email.perl              |    7 +++++--\n t/t9001-send-email.sh            |   21 +++++++++++++++++++++\n 3 files changed, 29 insertions(+), 4 deletions(-)\n"},{"id":"115737","messageId":"1244410857-920-2-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 1/6] send-email: fix a typo in a comment","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:52Z","receivedAt":"2009-06-07T21:40:52Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 3d6a982..5b7ab4e 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -804,7 +804,7 @@ sub sanitize_address\n }\n \n # Returns 1 if the message was sent, and 0 otherwise.\n-# In actuality, the whole program dies when a there\n+# In actuality, the whole program dies when there\n # is an error sending a message.\n \n sub send_message\n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115739","messageId":"1244410857-920-3-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:53Z","receivedAt":"2009-06-07T21:40:53Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n t/t9001-send-email.sh |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex ce26ea4..4ccca44 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'threading but no chain-reply-to' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--thread \\\n+\t\t--nochain-reply-to \\\n+\t\t$patches $patches |\n+\tgrep \"In-Reply-To: \"\n+'\n+\n test_done\n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115742","messageId":"1244410857-920-4-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 3/6] send-email: fix threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:54Z","receivedAt":"2009-06-07T21:40:54Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"These commands didn't send threaded mails anymore:\n\n    $ git format-patch <revision range>\n    $ git send-email --thread --no-chain-reply-to <files>\n\nThis regression was introduced in commit 15da108 (\"send-email:\n'References:' should only reference what is sent\", 2009-04-13) by a\nhidden code style change:\n\n    ! defined $reply_to || length($reply_to) == 0\nwas changed to\n    not defined $reply_to || length($reply_to) == 0\nwhich is\n    not (defined $reply_to || length($reply_to) == 0)\ninstead of\n    (not defined $reply_to) || (length($reply_to) == 0)\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-send-email.perl   |    2 +-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 5b7ab4e..c11a245 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1142,7 +1142,7 @@ foreach my $t (@files) {\n \tmy $message_was_sent = send_message();\n \n \t# set up for the next message\n-\tif ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) {\n+\tif ($message_was_sent and $chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 4ccca44..41af35a 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'threading but no chain-reply-to' '\n+test_expect_success 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115740","messageId":"1244410857-920-5-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 4/6] add a test for git-send-email for non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:55Z","receivedAt":"2009-06-07T21:40:55Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 41af35a..9cddd5f 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,6 +621,16 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\t! git send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches |\n+\tgrep \"In-Reply-To: \"\n+'\n+\n test_expect_success 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115741","messageId":"1244410857-920-6-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 5/6] send-email: fix non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:56Z","receivedAt":"2009-06-07T21:40:56Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"After commit 3e0c4ff (send-email: respect in-reply-to regardless of\nthreading, 2009-03-01) the variable $thread was only used for prompting\nfor an \"In-Reply-To\", but not for controlling whether the \"In-Reply-To\"\nand \"References\" fields should be written into the email.\n\nThus these fields were always used beginning with the second mail and it\nwas not possible to produce non-threaded mails anymore until commit\n15da108 (\"send-email: 'References:' should only reference what is sent\",\n2009-04-13), which introduced a regression with the side effect to make\nit possible again when --no-chain-reply-to was set.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-send-email.perl   |    5 ++++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex c11a245..be63ea7 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1142,7 +1142,10 @@ foreach my $t (@files) {\n \tmy $message_was_sent = send_message();\n \n \t# set up for the next message\n-\tif ($message_was_sent and $chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\tif ($message_was_sent and $thread and\n+\t\t\t$chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\t\t# with --chain-reply-to every time\n+\t\t# else only after the first mail (and only if --in-reply-to was not specified)\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 9cddd5f..12433a7 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'no in-reply-to and no threading' '\n+test_expect_success 'no in-reply-to and no threading' '\n \t! git send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115743","messageId":"1244410857-920-7-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 6/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-07T21:40:57Z","receivedAt":"2009-06-07T21:40:57Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Also remove the argument from --[no-]chain-reply-to.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n Documentation/git-send-email.txt |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 7c5ce41..dff90f0 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -161,7 +161,7 @@ Automating\n \tOutput of this command must be single email address per line.\n \tDefault is the value of 'sendemail.cccmd' configuration value.\n \n---[no-]chain-reply-to=<identifier>::\n+--[no-]chain-reply-to::\n \tIf this is set, each email will be sent as a reply to the previous\n \temail sent.  If disabled with \"--no-chain-reply-to\", all emails after\n \tthe first will be sent as replies to the first email sent.  When using\n@@ -210,7 +210,8 @@ specified, as well as 'body' if --no-signed-off-cc is specified.\n --[no-]thread::\n \tIf this is set, the In-Reply-To header will be set on each email sent.\n \tIf disabled with \"--no-thread\", no emails will have the In-Reply-To\n-\theader set. Default is the value of the 'sendemail.thread' configuration\n+\theader set, unless specified with --in-reply-to.\n+\tDefault is the value of the 'sendemail.thread' configuration\n \tvalue; if that is unspecified, default to --thread.\n \n \n-- \n1.6.3.2.221.g0ff2f\n"},{"id":"115753","messageId":"7v7hznaaji.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"1244410857-920-3-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-07T23:28:33Z","receivedAt":"2009-06-07T23:28:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> +test_expect_failure 'threading but no chain-reply-to' '\n> +\tgit send-email \\\n> +\t\t--dry-run \\\n> +\t\t--from=\"Example <nobody@example.com>\" \\\n> +\t\t--to=nobody@example.com \\\n> +\t\t--thread \\\n> +\t\t--nochain-reply-to \\\n> +\t\t$patches $patches |\n> +\tgrep \"In-Reply-To: \"\n> +'\n\nThanks, but this is not a very good style, as it won't catch if \"git\nsend-email\" dumps core or otherwise fails, exiting with a non-zero status.\n\nSame comments applies to [PATCH 4/6] as well.\n"},{"id":"115766","messageId":"200906080747.18233.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7v7hznaaji.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-08T05:47:17Z","receivedAt":"2009-06-08T05:47:17Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Junio C Hamano, 08.06.2009:\n> Markus Heidelberg <markus.heidelberg@web.de> writes:\n> \n> > +test_expect_failure 'threading but no chain-reply-to' '\n> > +\tgit send-email \\\n> > +\t\t--dry-run \\\n> > +\t\t--from=\"Example <nobody@example.com>\" \\\n> > +\t\t--to=nobody@example.com \\\n> > +\t\t--thread \\\n> > +\t\t--nochain-reply-to \\\n> > +\t\t$patches $patches |\n> > +\tgrep \"In-Reply-To: \"\n> > +'\n> \n> Thanks, but this is not a very good style, as it won't catch if \"git\n> send-email\" dumps core or otherwise fails, exiting with a non-zero status.\n> \n> Same comments applies to [PATCH 4/6] as well.\n\nOK, this was my first attempt in writing a test and I just used the last\ntest 'in-reply-to but no threading' as template.\n\nWhat can be done to make the test better?\n"},{"id":"115768","messageId":"200906080837.31548.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"200906080747.18233.markus.heidelberg@web.de","subject":"[PATCH v2 2/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-08T06:37:31Z","receivedAt":"2009-06-08T06:37:31Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nMarkus Heidelberg, 08.06.2009:\n> Junio C Hamano, 08.06.2009:\n> > Markus Heidelberg <markus.heidelberg@web.de> writes:\n> > \n> > > +test_expect_failure 'threading but no chain-reply-to' '\n> > > +\tgit send-email \\\n> > > +\t\t--dry-run \\\n> > > +\t\t--from=\"Example <nobody@example.com>\" \\\n> > > +\t\t--to=nobody@example.com \\\n> > > +\t\t--thread \\\n> > > +\t\t--nochain-reply-to \\\n> > > +\t\t$patches $patches |\n> > > +\tgrep \"In-Reply-To: \"\n> > > +'\n> > \n> > Thanks, but this is not a very good style, as it won't catch if \"git\n> > send-email\" dumps core or otherwise fails, exiting with a non-zero status.\n> > \n> > Same comments applies to [PATCH 4/6] as well.\n> \n> OK, this was my first attempt in writing a test and I just used the last\n> test 'in-reply-to but no threading' as template.\n> \n> What can be done to make the test better?\n\nIs this change sufficient? Dumping the stdout into a file and grepping\nthis.\n\n\n t/t9001-send-email.sh |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex ce26ea4..8f810ab 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'threading but no chain-reply-to' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--thread \\\n+\t\t--nochain-reply-to \\\n+\t\t$patches $patches >stdout &&\n+\tgrep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.220.gb421\n"},{"id":"115769","messageId":"200906080842.00357.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-5-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH v2 4/6] add a test for git-send-email for non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-08T06:41:59Z","receivedAt":"2009-06-08T06:41:59Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nDifferences to v1:\n* dump stdout into a file and grep this\n* use \"test_must_fail grep\" instead of \"!git send-email\"\n  I'm not sure about this. When should test_must_fail be used and when\n  is !command OK?\n\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 990dd1a..4a4fa7f 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,6 +621,16 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches >stdout &&\n+\ttest_must_fail grep \"In-Reply-To: \" stdout\n+'\n+\n test_expect_success 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n-- \n1.6.3.2.220.gb421\n"},{"id":"115770","messageId":"200906080843.57069.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244410857-920-6-git-send-email-markus.heidelberg@web.de","subject":"[PATCH v2 5/6] send-email: fix non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-08T06:43:56Z","receivedAt":"2009-06-08T06:43:56Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"After commit 3e0c4ff (send-email: respect in-reply-to regardless of\nthreading, 2009-03-01) the variable $thread was only used for prompting\nfor an \"In-Reply-To\", but not for controlling whether the \"In-Reply-To\"\nand \"References\" fields should be written into the email.\n\nThus these fields were always used beginning with the second mail and it\nwas not possible to produce non-threaded mails anymore until commit\n15da108 (\"send-email: 'References:' should only reference what is sent\",\n2009-04-13), which introduced a regression with the side effect to make\nit possible again when --no-chain-reply-to was set.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nDifferences to v1:\n* patch context in the test:\n  \"git send-email\" instead of \"!git send-email\"\n\n git-send-email.perl   |    5 ++++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex c11a245..be63ea7 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1142,7 +1142,10 @@ foreach my $t (@files) {\n \tmy $message_was_sent = send_message();\n \n \t# set up for the next message\n-\tif ($message_was_sent and $chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\tif ($message_was_sent and $thread and\n+\t\t\t$chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\t\t# with --chain-reply-to every time\n+\t\t# else only after the first mail (and only if --in-reply-to was not specified)\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 4a4fa7f..87bbbe7 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'no in-reply-to and no threading' '\n+test_expect_success 'no in-reply-to and no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.220.gb421\n"},{"id":"115771","messageId":"7vhbyr8b7m.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"200906080837.31548.markus.heidelberg@web.de","subject":"Re: [PATCH v2 2/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-08T06:57:01Z","receivedAt":"2009-06-08T06:57:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n>> What can be done to make the test better?\n>\n> Is this change sufficient? Dumping the stdout into a file and grepping\n> this.\n\nYup, that is better for test scripts.\n\n>\n>\n>  t/t9001-send-email.sh |   11 +++++++++++\n>  1 files changed, 11 insertions(+), 0 deletions(-)\n>\n> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\n> index ce26ea4..8f810ab 100755\n> --- a/t/t9001-send-email.sh\n> +++ b/t/t9001-send-email.sh\n> @@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '\n>  \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n>  '\n>  \n> +test_expect_failure 'threading but no chain-reply-to' '\n> +\tgit send-email \\\n> +\t\t--dry-run \\\n> +\t\t--from=\"Example <nobody@example.com>\" \\\n> +\t\t--to=nobody@example.com \\\n> +\t\t--thread \\\n> +\t\t--nochain-reply-to \\\n> +\t\t$patches $patches >stdout &&\n> +\tgrep \"In-Reply-To: \" stdout\n> +'\n> +\n>  test_done\n> -- \n> 1.6.3.2.220.gb421\n"},{"id":"115772","messageId":"7vd49f8b1f.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"200906080842.00357.markus.heidelberg@web.de","subject":"Re: [PATCH v2 4/6] add a test for git-send-email for non-threaded mails","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-08T07:00:44Z","receivedAt":"2009-06-08T07:00:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n> ---\n>\n> Differences to v1:\n> * dump stdout into a file and grep this\n> * use \"test_must_fail grep\" instead of \"!git send-email\"\n>   I'm not sure about this. When should test_must_fail be used and when\n>   is !command OK?\n\nThanks.\n\nGenerally, we protect \"git\" (i.e. what we write ourselves) with test_must_fail\nso that we can catch stupid segfaulting crash we introduce ourselves\n(unlike \"! git foo\", \"test_must_fail git foo\" says \"oh, no, it did not\ncorrectly fail\" if git segfaults).  We do not expect \"grep\" to segfault\n(iow we are not testing \"grep\"), so it is customary to say \"! grep\".\n"},{"id":"115774","messageId":"200906080913.16894.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7vd49f8b1f.fsf@alter.siamese.dyndns.org","subject":"[PATCH v3 4/6] add a test for git-send-email for non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-08T07:13:16Z","receivedAt":"2009-06-08T07:13:16Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n\nJunio C Hamano, 08.06.2009:\n> Generally, we protect \"git\" (i.e. what we write ourselves) with test_must_fail\n> so that we can catch stupid segfaulting crash we introduce ourselves\n> (unlike \"! git foo\", \"test_must_fail git foo\" says \"oh, no, it did not\n> correctly fail\" if git segfaults).  We do not expect \"grep\" to segfault\n> (iow we are not testing \"grep\"), so it is customary to say \"! grep\".\n\nThanks for the explanation.\n\nDifferences to v2:\n* \"! grep\" instead of \"test_must_fail grep\"\n\n\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 990dd1a..20efdc1 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,6 +621,16 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches >stdout &&\n+\t! grep \"In-Reply-To: \" stdout\n+'\n+\n test_expect_success 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n-- \n1.6.3.2.224.gaa543\n"},{"id":"115847","messageId":"7vljo2wgco.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"1244410857-920-2-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH 1/6] send-email: fix a typo in a comment","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-08T21:44:23Z","receivedAt":"2009-06-08T21:44:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks; is there any patch among the six that should go to 'maint' (aka\n1.6.3.X)?\n"},{"id":"115875","messageId":"200906090905.58446.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7vljo2wgco.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/6] send-email: fix a typo in a comment","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-09T07:05:57Z","receivedAt":"2009-06-09T07:05:57Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Junio C Hamano, 08.06.2009:\n> Thanks; is there any patch among the six that should go to 'maint' (aka\n> 1.6.3.X)?\n\n[PATCH 4/6] add a test for git-send-email for non-threaded mails\n[PATCH 5/6] send-email: fix non-threaded mails\n\nfix the regression from commit 3e0c4ff (send-email: respect in-reply-to\nregardless of threading, 2009-03-01), which was included before 1.6.3\nand so is included in 'maint', so they should go to 'maint'. I'll resend\nrebased.\n\n[PATCH 1/6] send-email: fix a typo in a comment\n[PATCH 2/6] add a test for git-send-email for threaded mails without chain-reply-to\n[PATCH 3/6] send-email: fix threaded mails without chain-reply-to\n\nfix commit 15da108 (\"send-email: 'References:' should only reference\nwhat is sent\", 2009-04-13), which was included after 1.6.3 directly to\n'master', so they don't go to 'maint'.\n\nI don't know how documentation fixes are handled for inclusion to\n'maint', but this could apply to 'maint' as well:\n\n[PATCH 6/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread\n"},{"id":"115876","messageId":"1244531491-21312-1-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"200906090905.58446.markus.heidelberg@web.de","subject":"[PATCH 1/2] add a test for git-send-email for non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-09T07:11:30Z","receivedAt":"2009-06-09T07:11:30Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex ce26ea4..5bfa36e 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,14 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches >stdout &&\n+\t! grep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.8.g055bf\n"},{"id":"115877","messageId":"1244531491-21312-2-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"200906090905.58446.markus.heidelberg@web.de","subject":"[PATCH 2/2] send-email: fix non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-09T07:11:31Z","receivedAt":"2009-06-09T07:11:31Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"After commit 3e0c4ff (send-email: respect in-reply-to regardless of\nthreading, 2009-03-01) the variable $thread was only used for prompting\nfor an \"In-Reply-To\", but not for controlling whether the \"In-Reply-To\"\nand \"References\" fields should be written into the email.\n\nThus these fields were always used beginning with the second mail and it\nwas not possible to produce non-threaded mails anymore until commit\n15da108 (\"send-email: 'References:' should only reference what is sent\",\n2009-04-13), which introduced a regression with the side effect to make\nit possible again when --no-chain-reply-to was set.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n---\n git-send-email.perl   |    5 ++++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex cccbf45..3f31b7b 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1137,7 +1137,10 @@ foreach my $t (@files) {\n \tsend_message();\n \n \t# set up for the next message\n-\tif ($chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\tif ($thread and\n+\t\t\t$chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\t\t# with --chain-reply-to every time\n+\t\t# else only after the first mail (and only if --in-reply-to was not specified)\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 5bfa36e..8518aca 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'no in-reply-to and no threading' '\n+test_expect_success 'no in-reply-to and no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.8.g055bf\n"},{"id":"115983","messageId":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"1244410857-920-4-git-send-email-markus.heidelberg@web.de","subject":"Re: [PATCH 3/6] send-email: fix threaded mails without chain-reply-to","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-10T05:51:56Z","receivedAt":"2009-06-10T05:51:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> These commands didn't send threaded mails anymore:\n>\n>     $ git format-patch <revision range>\n>     $ git send-email --thread --no-chain-reply-to <files>\n>\n> This regression was introduced in commit 15da108 (\"send-email:\n> 'References:' should only reference what is sent\", 2009-04-13) by a\n> hidden code style change:\n>\n>     ! defined $reply_to || length($reply_to) == 0\n> was changed to\n>     not defined $reply_to || length($reply_to) == 0\n> which is\n>     not (defined $reply_to || length($reply_to) == 0)\n> instead of\n>     (not defined $reply_to) || (length($reply_to) == 0)\n>\n> Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\n> ...\n> -\tif ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) {\n> +\tif ($message_was_sent and $chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n\nYou were too polite to say \"by a hidden code style change\", instead of\nsaying something stronger, like \"without understanding the operator\nprecedence rules\", but I actually thing that is what is going on.  Not\njust the original author of 15da108 but no reviewer noticed when the patch\nwas posted on the list.\n\nThe problem description strongly suggests to me that we should probably\nfix the use of \"and\" here as well in order to avoid confusing ourselves.\n\nYou have another patch that touches this area that adds \"and $thread\", but\nI think it is much less error prone if we stick to && and || with explicit\nparentheses to clarify the precedence we want to see.\n"},{"id":"115985","messageId":"7v63f4v9sl.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[RF sanity check] send-email threading fixes (was Re: [PATCH 3/6] send-email: fix threaded mails without chain-reply-to)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-10T07:15:54Z","receivedAt":"2009-06-10T07:15:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> You were too polite to say \"by a hidden code style change\", instead of\n> saying something stronger,...\n\nErm, I meant \"you were very polite and said\"...\n\nIn any case, here is what I came up with by reshuffling your six patches.\n\n[PATCH 1/6] add a test for git-send-email for non-threaded mails\n[PATCH 2/6] send-email: fix non-threaded mails\n[PATCH 3/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread\n[PATCH 4/6] send-email: fix threaded mails without chain-reply-to\n[PATCH 5/6] add a test for git-send-email for threaded mails without chain-reply-to\n[PATCH 6/6] send-email: fix a typo in a comment\n\nThe first three patches apply to the tip of 'maint', which is currently at\n802f9c9 (diff.c: plug a memory leak in an error path, 2009-06-08).  The\nfirst one exposes breakage introduced by 3e0c4ff and then the second one\nfixes it.\n\nPatch 4/6 applies on top of 15da108 to fix a breakage introduced by that\ncommit.  Together with the result of applying the first three patches to\nmaint, they fix --no-thread and --thread (without --chain-reply-to) cases.\nThe result can be verified by applying Patch 5/6 on top of them.\n\nThey will appear in tonight's 'pu'; the overall tip for the topic would be\nat 479ad6b (unless I find breakages during the final testing).\n\nThanks.\n"},{"id":"115986","messageId":"7vy6s0tv7w.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 1/6] add a test for git-send-email for non-threaded mails","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:16:03Z","receivedAt":"2009-06-10T07:16:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Mon, 8 Jun 2009 09:13:16 +0200\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * To be applied on 'maint'.\n\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex ce26ea4..5bfa36e 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,14 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches >stdout &&\n+\t! grep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"115987","messageId":"7vr5xstv7m.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 2/6] send-email: fix non-threaded mails","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:16:13Z","receivedAt":"2009-06-10T07:16:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Mon, 8 Jun 2009 08:43:56 +0200\n\nAfter commit 3e0c4ff (send-email: respect in-reply-to regardless of\nthreading, 2009-03-01) the variable $thread was only used for prompting\nfor an \"In-Reply-To\", but not for controlling whether the \"In-Reply-To\"\nand \"References\" fields should be written into the email.\n\nThus these fields were always used beginning with the second mail and it\nwas not possible to produce non-threaded mails anymore until commit\n15da108 (\"send-email: 'References:' should only reference what is sent\",\n2009-04-13), which introduced a regression with the side effect to make\nit possible again when --no-chain-reply-to was set.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of [1/6]\n\n git-send-email.perl   |    3 ++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex cccbf45..5d51697 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1137,7 +1137,8 @@ foreach my $t (@files) {\n \tsend_message();\n \n \t# set up for the next message\n-\tif ($chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\tif ($thread &&\n+\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 5bfa36e..8518aca 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'no in-reply-to and no threading' '\n+test_expect_success 'no in-reply-to and no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"115988","messageId":"7vk53ktv7h.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 3/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:16:18Z","receivedAt":"2009-06-10T07:16:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Sun, 7 Jun 2009 23:40:57 +0200\n\nAlso remove the argument from --[no-]chain-reply-to.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of [2/6]\n\n Documentation/git-send-email.txt |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex 794224b..3c7f896 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -155,7 +155,7 @@ Automating\n \tOutput of this command must be single email address per line.\n \tDefault is the value of 'sendemail.cccmd' configuration value.\n \n---[no-]chain-reply-to=<identifier>::\n+--[no-]chain-reply-to::\n \tIf this is set, each email will be sent as a reply to the previous\n \temail sent.  If disabled with \"--no-chain-reply-to\", all emails after\n \tthe first will be sent as replies to the first email sent.  When using\n@@ -204,7 +204,8 @@ specified, as well as 'body' if --no-signed-off-cc is specified.\n --[no-]thread::\n \tIf this is set, the In-Reply-To header will be set on each email sent.\n \tIf disabled with \"--no-thread\", no emails will have the In-Reply-To\n-\theader set. Default is the value of the 'sendemail.thread' configuration\n+\theader set, unless specified with --in-reply-to.\n+\tDefault is the value of the 'sendemail.thread' configuration\n \tvalue; if that is unspecified, default to --thread.\n \n \n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"115989","messageId":"7vd49ctv60.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 4/6] send-email: fix threaded mails without chain-reply-to","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:17:11Z","receivedAt":"2009-06-10T07:17:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Sun, 7 Jun 2009 23:40:54 +0200\n\nAn earlier commit 15da108 (\"send-email: 'References:' should only\nreference what is sent\", 2009-04-13) broke logic to set up threading\ninformation for the next message by rewriting \"!\" to \"not\" without\nunderstanding the precedence rules of the language.\n\nNamely,\n\n    ! defined $reply_to || length($reply_to) == 0\n\nwas changed to\n\n    not defined $reply_to || length($reply_to) == 0\n\nwhich is\n\n    not (defined $reply_to || length($reply_to) == 0)\n\nand different from what was intended, which is\n\n    (not defined $reply_to) || (length($reply_to) == 0)\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of 15da108 to fix the breakage there.\n\n git-send-email.perl |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 43f956b..c55b045 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1135,7 +1135,8 @@ foreach my $t (@files) {\n \tmy $message_was_sent = send_message();\n \n \t# set up for the next message\n-\tif ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) {\n+\tif ($message_was_sent &&\n+\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"115990","messageId":"7v63f4tv5r.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 5/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:17:20Z","receivedAt":"2009-06-10T07:17:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Mon, 8 Jun 2009 08:37:31 +0200\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * To be applied on top of:\n   - applying 1/6, 2/6 and 3/6 to maint\n   - applying 4/6 to 15da108; then\n   - merging the above two together.\n   to demonstrate the fix in 4/6\n\n t/t9001-send-email.sh |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 2ce24cd..4f67de3 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'threading but no chain-reply-to' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--thread \\\n+\t\t--nochain-reply-to \\\n+\t\t$patches $patches >stdout &&\n+\tgrep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"115991","messageId":"7vy6s0sgky.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"7vhbyo1vr7.fsf@alter.siamese.dyndns.org","subject":"[PATCH 6/6] send-email: fix a typo in a comment","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2009-06-10T07:17:33Z","receivedAt":"2009-06-10T07:17:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Markus Heidelberg <markus.heidelberg@web.de>\nDate: Sun, 7 Jun 2009 23:40:52 +0200\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * This is pretty much an independent fix; applicable to 'master'.\n\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex be7eb5c..303e03a 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -812,7 +812,7 @@ sub sanitize_address\n }\n \n # Returns 1 if the message was sent, and 0 otherwise.\n-# In actuality, the whole program dies when a there\n+# In actuality, the whole program dies when there\n # is an error sending a message.\n \n sub send_message\n-- \n1.6.3.2.214.gf4f78e\n"},{"id":"116081","messageId":"200906111849.40232.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7v63f4v9sl.fsf@alter.siamese.dyndns.org","subject":"Re: [RF sanity check] send-email threading fixes (was Re: [PATCH 3/6] send-email: fix threaded mails without chain-reply-to)","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-11T16:49:39Z","receivedAt":"2009-06-11T16:49:39Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Junio C Hamano, 10.06.2009:\n> In any case, here is what I came up with by reshuffling your six patches.\n> \n> [PATCH 1/6] add a test for git-send-email for non-threaded mails\n> [PATCH 2/6] send-email: fix non-threaded mails\n> [PATCH 3/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread\n> [PATCH 4/6] send-email: fix threaded mails without chain-reply-to\n> [PATCH 5/6] add a test for git-send-email for threaded mails without chain-reply-to\n> [PATCH 6/6] send-email: fix a typo in a comment\n> \n> Patch 4/6 applies on top of 15da108 to fix a breakage introduced by that\n> commit.  Together with the result of applying the first three patches to\n> maint, they fix --no-thread and --thread (without --chain-reply-to) cases.\n> The result can be verified by applying Patch 5/6 on top of them.\n\nOut of curiosity: why are 4/6 and 5/6 applied on different branches\nwithout the usual commits first \"test with test_expect_fail\" then \"fix +\ntest changed to test_expect_success\"?\n"},{"id":"116093","messageId":"7vprdah5es.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"200906111849.40232.markus.heidelberg@web.de","subject":"Re: [RF sanity check] send-email threading fixes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-11T20:38:51Z","receivedAt":"2009-06-11T20:38:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n>> [PATCH 4/6] send-email: fix threaded mails without chain-reply-to\n>> [PATCH 5/6] add a test for git-send-email for threaded mails without chain-reply-to\n>> [PATCH 6/6] send-email: fix a typo in a comment\n>> \n>> Patch 4/6 applies on top of 15da108 to fix a breakage introduced by that\n>> commit.  Together with the result of applying the first three patches to\n>> maint, they fix --no-thread and --thread (without --chain-reply-to) cases.\n>> The result can be verified by applying Patch 5/6 on top of them.\n>\n> Out of curiosity: why are 4/6 and 5/6 applied on different branches\n> without the usual commits first \"test with test_expect_fail\" then \"fix +\n> test changed to test_expect_success\"?\n\nMaybe I misunderstood your problem description, but my impression from it\nwas that 4/6 is a fix to a latent bug in 15da108 that later affected what\nwas done by new code that appeard somewhere between 15da108 and 'master',\nand the test 5/6 was about that breakage.  IOW, root cause was older than\nthe symptom.\n"},{"id":"116103","messageId":"200906120049.02368.markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7vprdah5es.fsf@alter.siamese.dyndns.org","subject":"Re: [RF sanity check] send-email threading fixes","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-11T22:49:01Z","receivedAt":"2009-06-11T22:49:01Z","isPatch":false,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Junio C Hamano, 11.06.2009:\n> Markus Heidelberg <markus.heidelberg@web.de> writes:\n> \n> >> [PATCH 4/6] send-email: fix threaded mails without chain-reply-to\n> >> [PATCH 5/6] add a test for git-send-email for threaded mails without chain-reply-to\n> >> [PATCH 6/6] send-email: fix a typo in a comment\n> >> \n> >> Patch 4/6 applies on top of 15da108 to fix a breakage introduced by that\n> >> commit.  Together with the result of applying the first three patches to\n> >> maint, they fix --no-thread and --thread (without --chain-reply-to) cases.\n> >> The result can be verified by applying Patch 5/6 on top of them.\n> >\n> > Out of curiosity: why are 4/6 and 5/6 applied on different branches\n> > without the usual commits first \"test with test_expect_fail\" then \"fix +\n> > test changed to test_expect_success\"?\n> \n> Maybe I misunderstood your problem description, but my impression from it\n> was that 4/6 is a fix to a latent bug in 15da108\n\nRight, ...\n\n> that later affected what\n\n... but the bug was immediately noticable.\n\n> was done by new code that appeard somewhere between 15da108 and 'master',\n\nThe other regression from 3e0c4ff appeared before 15da108, not after it.\nThis regression was immediately noticable as well.\n\n> and the test 5/6 was about that breakage.\n\nNo, 5/6 was only about the breakage in 15da108 fixed by 4/6. I noticed\nthe regression in 3e0c4ff after it.\n\n> IOW, root cause was older than\n> the symptom.\n\nSince it's a bit confusing, I'll try to clarify:\n\n* 3e0c4ff (2009-03-01) broke non-threaded\n  This sent threaded mails instead of non-threaded:\n    $ git send-email --no-thread --no-chain-reply-to\n    $ git send-email --no-thread --chain-reply-to\n* 1/6 tests this\n* 2/6 fixes this\n\n* 15da108 (2009-04-13) broke threaded without chain-reply\n  This sent non-threaded mails instead of threaded:\n    $ git send-email --thread --no-chain-reply-to\n  This correctly sent threaded mails:\n    $ git send-email --thread --chain-reply-to\n* 4/6 fixes this\n* 5/6 tests this\n* 15da108 additionally changed another behaviour\n  (this is the side effect from the 2/6 description, which is\n   anticipating in view of the reordered patch sequence):\n  This now sent non-threaded mails again, which has been broken by 3e0c4ff:\n    $ git send-email --no-thread --no-chain-reply-to\n  This still sent threaded mails instead of non-threaded, it was still\n  broken since 3e0c4ff:\n    $ git send-email --no-thread --chain-reply-to\n\nHTH and I got everything explained correctly.\n"},{"id":"116106","messageId":"7vd49afjbv.fsf@alter.siamese.dyndns.org","threadId":"19727","inReplyTo":"200906120049.02368.markus.heidelberg@web.de","subject":"Re: [RF sanity check] send-email threading fixes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-11T23:21:08Z","receivedAt":"2009-06-11T23:21:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Markus Heidelberg <markus.heidelberg@web.de> writes:\n\n> HTH and I got everything explained correctly.\n\nNow, you can summarize the series with a proper [0/6], perhaps modelling\nafter how I explained the order of application and merge structure ;-).\n"},{"id":"116132","messageId":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"7vd49afjbv.fsf@alter.siamese.dyndns.org","subject":"[PATCH 0/6] send-email threading fixes","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:49:26Z","receivedAt":"2009-06-12T10:49:26Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Junio C Hamano, 12.06.2009:\n> Markus Heidelberg <markus.heidelberg@web.de> writes:\n> \n> > HTH and I got everything explained correctly.\n> \n> Now, you can summarize the series with a proper [0/6], perhaps modelling\n> after how I explained the order of application and merge structure ;-).\n\nOK, I'll try :)\nFor easier understanding I kept the wording from your reshuffled series.\n\n[PATCH 1/6] add a test for git-send-email for non-threaded mails\n[PATCH 2/6] send-email: fix non-threaded mails\n[PATCH 3/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread\n[PATCH 4/6] add a test for git-send-email for threaded mails without chain-reply-to\n[PATCH 5/6] send-email: fix threaded mails without chain-reply-to\n[PATCH 6/6] send-email: fix a typo in a comment\n\nThe first three patches apply to the tip of 'maint', which is currently at\n94af7c3 (Documentation: git-send-mail can take rev-list arg to drive\nformat-patch, 2009-06-11).  The first one exposes breakage introduced by\n3e0c4ff and then the second one fixes it.\n\nThe last three patches apply to the tip of 'master'. Patch 4/6 exposes\nbreakage introduced by 15da108, patch 5/6 fixes it.\n\nChanges compared to 'pu':\n\n * adjusted the description of 2/6 to hopefully add less confusion\n * changed the order of 4/6 and 5/6 and applied 5/6 directly on top of 4/6,\n   since the regression was immediately noticable\n * also change test_expect_failure to test_expect_success in 5/6 then\n * instead of in the former merge commit a6f8abc \"Merge branch\n   'mh/master-send-email-threaded-fix' into mh/master-send-email\"\n"},{"id":"116133","messageId":"1244803902-8068-1-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 1/6] add a test for git-send-email for non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:37Z","receivedAt":"2009-06-12T10:51:37Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * To be applied on 'maint'.\n\n t/t9001-send-email.sh |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex ce26ea4..5bfa36e 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,14 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'no in-reply-to and no threading' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--nothread \\\n+\t\t$patches $patches >stdout &&\n+\t! grep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.236.ge505d\n"},{"id":"116134","messageId":"1244803902-8068-2-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 2/6] send-email: fix non-threaded mails","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:38Z","receivedAt":"2009-06-12T10:51:38Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"After commit 3e0c4ff (send-email: respect in-reply-to regardless of\nthreading, 2009-03-01) the variable $thread was only used for prompting\nfor an \"In-Reply-To\", but not for controlling whether the \"In-Reply-To\"\nand \"References\" fields should be written into the email.\n\nThus these fields were always used beginning with the second mail and it\nwas not possible to produce non-threaded mails anymore.\n\nHowever, a later commit 15da108 (\"send-email: 'References:' should only\nreference what is sent\", 2009-04-13) introduced a regression with the\nside effect to make non-threaded mails possible again, but only when\n--no-chain-reply-to was used.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of [1/6]\n\n git-send-email.perl   |    3 ++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex cccbf45..5d51697 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1137,7 +1137,8 @@ foreach my $t (@files) {\n \tsend_message();\n \n \t# set up for the next message\n-\tif ($chain_reply_to || !defined $reply_to || length($reply_to) == 0) {\n+\tif ($thread &&\n+\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 5bfa36e..8518aca 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'no in-reply-to and no threading' '\n+test_expect_success 'no in-reply-to and no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.236.ge505d\n"},{"id":"116137","messageId":"1244803902-8068-3-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 3/6] doc/send-email: clarify the behavior of --in-reply-to with --no-thread","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:39Z","receivedAt":"2009-06-12T10:51:39Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Also remove the argument from --[no-]chain-reply-to.\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of [2/6]\n\n Documentation/git-send-email.txt |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex a282190..0ec5343 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -159,7 +159,7 @@ Automating\n \tOutput of this command must be single email address per line.\n \tDefault is the value of 'sendemail.cccmd' configuration value.\n \n---[no-]chain-reply-to=<identifier>::\n+--[no-]chain-reply-to::\n \tIf this is set, each email will be sent as a reply to the previous\n \temail sent.  If disabled with \"--no-chain-reply-to\", all emails after\n \tthe first will be sent as replies to the first email sent.  When using\n@@ -208,7 +208,8 @@ specified, as well as 'body' if --no-signed-off-cc is specified.\n --[no-]thread::\n \tIf this is set, the In-Reply-To header will be set on each email sent.\n \tIf disabled with \"--no-thread\", no emails will have the In-Reply-To\n-\theader set. Default is the value of the 'sendemail.thread' configuration\n+\theader set, unless specified with --in-reply-to.\n+\tDefault is the value of the 'sendemail.thread' configuration\n \tvalue; if that is unspecified, default to --thread.\n \n \n-- \n1.6.3.2.236.ge505d\n"},{"id":"116135","messageId":"1244803902-8068-4-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 4/6] add a test for git-send-email for threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:40Z","receivedAt":"2009-06-12T10:51:40Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * To be applied on 'master'.\n\n t/t9001-send-email.sh |   11 +++++++++++\n 1 files changed, 11 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 2ce24cd..4f67de3 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,4 +621,15 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n+test_expect_failure 'threading but no chain-reply-to' '\n+\tgit send-email \\\n+\t\t--dry-run \\\n+\t\t--from=\"Example <nobody@example.com>\" \\\n+\t\t--to=nobody@example.com \\\n+\t\t--thread \\\n+\t\t--nochain-reply-to \\\n+\t\t$patches $patches >stdout &&\n+\tgrep \"In-Reply-To: \" stdout\n+'\n+\n test_done\n-- \n1.6.3.2.236.ge505d\n"},{"id":"116138","messageId":"1244803902-8068-5-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 5/6] send-email: fix threaded mails without chain-reply-to","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:41Z","receivedAt":"2009-06-12T10:51:41Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"An earlier commit 15da108 (\"send-email: 'References:' should only\nreference what is sent\", 2009-04-13) broke logic to set up threading\ninformation for the next message by rewriting \"!\" to \"not\" without\nunderstanding the precedence rules of the language.\n\nNamely,\n\n    ! defined $reply_to || length($reply_to) == 0\n\nwas changed to\n\n    not defined $reply_to || length($reply_to) == 0\n\nwhich is\n\n    not (defined $reply_to || length($reply_to) == 0)\n\nand different from what was intended, which is\n\n    (not defined $reply_to) || (length($reply_to) == 0)\n\nSigned-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * Applies on top of [4/6]\n\n git-send-email.perl   |    3 ++-\n t/t9001-send-email.sh |    2 +-\n 2 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 4c795a4..16d12e0 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -1150,7 +1150,8 @@ foreach my $t (@files) {\n \tmy $message_was_sent = send_message();\n \n \t# set up for the next message\n-\tif ($message_was_sent and $chain_reply_to || not defined $reply_to || length($reply_to) == 0) {\n+\tif ($message_was_sent &&\n+\t\t($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {\n \t\t$reply_to = $message_id;\n \t\tif (length $references > 0) {\n \t\t\t$references .= \"\\n $message_id\";\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 4f67de3..8ab1a78 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -621,7 +621,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_failure 'threading but no chain-reply-to' '\n+test_expect_success 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n-- \n1.6.3.2.236.ge505d\n"},{"id":"116136","messageId":"1244803902-8068-6-git-send-email-markus.heidelberg@web.de","threadId":"19727","inReplyTo":"1244803766-7785-1-git-send-email-markus.heidelberg@web.de","subject":"[PATCH 6/6] send-email: fix a typo in a comment","fromName":"Markus Heidelberg","fromEmail":"markus.heidelberg@web.de","sentAt":"2009-06-12T10:51:42Z","receivedAt":"2009-06-12T10:51:42Z","isPatch":true,"sender":{"key":"markus.heidelberg@web.de","avatar":"https://avatars.githubusercontent.com/u/6334512?v=4"},"body":"Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * This is pretty much an independent fix; applicable to 'master'.\n\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 16d12e0..4a77d44 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -812,7 +812,7 @@ sub sanitize_address\n }\n \n # Returns 1 if the message was sent, and 0 otherwise.\n-# In actuality, the whole program dies when a there\n+# In actuality, the whole program dies when there\n # is an error sending a message.\n \n sub send_message\n-- \n1.6.3.2.236.ge505d\n"}]}