Git fork

e-mail workflow: Message-ID is spelled with ID in both capital letters

We used to write "Message-Id:" and "Message-ID:" pretty much
interchangeably, and the header name is defined to be case
insensitive by the RFCs, but the canonical form "Message-ID:" is
used throughout the RFC documents, so let's imitate it ourselves.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Elijah Newren <newren@gmail.com>

+75 -75
+7 -7
Documentation/MyFirstContribution.txt
··· 1171 need the exact same body in your second cover letter; focus on explaining to 1172 reviewers the changes you've made that may not be as visible. 1173 1174 - You will also need to go and find the Message-Id of your previous cover letter. 1175 You can either note it when you send the first series, from the output of `git 1176 send-email`, or you can look it up on the 1177 https://lore.kernel.org/git[mailing list]. Find your cover letter in the 1178 - archives, click on it, then click "permalink" or "raw" to reveal the Message-Id 1179 header. It should match: 1180 1181 ---- 1182 - Message-Id: <foo.12345.author@example.com> 1183 ---- 1184 1185 - Your Message-Id is `<foo.12345.author@example.com>`. This example will be used 1186 - below as well; make sure to replace it with the correct Message-Id for your 1187 - **previous cover letter** - that is, if you're sending v2, use the Message-Id 1188 - from v1; if you're sending v3, use the Message-Id from v2. 1189 1190 While you're looking at the email, you should also note who is CC'd, as it's 1191 common practice in the mailing list to keep all CCs on a thread. You can add
··· 1171 need the exact same body in your second cover letter; focus on explaining to 1172 reviewers the changes you've made that may not be as visible. 1173 1174 + You will also need to go and find the Message-ID of your previous cover letter. 1175 You can either note it when you send the first series, from the output of `git 1176 send-email`, or you can look it up on the 1177 https://lore.kernel.org/git[mailing list]. Find your cover letter in the 1178 + archives, click on it, then click "permalink" or "raw" to reveal the Message-ID 1179 header. It should match: 1180 1181 ---- 1182 + Message-ID: <foo.12345.author@example.com> 1183 ---- 1184 1185 + Your Message-ID is `<foo.12345.author@example.com>`. This example will be used 1186 + below as well; make sure to replace it with the correct Message-ID for your 1187 + **previous cover letter** - that is, if you're sending v2, use the Message-ID 1188 + from v1; if you're sending v3, use the Message-ID from v2. 1189 1190 While you're looking at the email, you should also note who is CC'd, as it's 1191 common practice in the mailing list to keep all CCs on a thread. You can add
+2 -2
Documentation/git-format-patch.txt
··· 99 100 If given `--thread`, `git-format-patch` will generate `In-Reply-To` and 101 `References` headers to make the second and subsequent patch mails appear 102 - as replies to the first mail; this also generates a `Message-Id` header to 103 reference. 104 105 OPTIONS ··· 163 --no-thread:: 164 Controls addition of `In-Reply-To` and `References` headers to 165 make the second and subsequent mails appear as replies to the 166 - first. Also controls generation of the `Message-Id` header to 167 reference. 168 + 169 The optional <style> argument can be either `shallow` or `deep`.
··· 99 100 If given `--thread`, `git-format-patch` will generate `In-Reply-To` and 101 `References` headers to make the second and subsequent patch mails appear 102 + as replies to the first mail; this also generates a `Message-ID` header to 103 reference. 104 105 OPTIONS ··· 163 --no-thread:: 164 Controls addition of `In-Reply-To` and `References` headers to 165 make the second and subsequent mails appear as replies to the 166 + first. Also controls generation of the `Message-ID` header to 167 reference. 168 + 169 The optional <style> argument can be either `shallow` or `deep`.
+1 -1
Documentation/git-send-email.txt
··· 93 94 --in-reply-to=<identifier>:: 95 Make the first mail (or all the mails with `--no-thread`) appear as a 96 - reply to the given Message-Id, which avoids breaking threads to 97 provide a new patch series. 98 The second and subsequent emails will be sent as replies according to 99 the `--[no-]chain-reply-to` setting.
··· 93 94 --in-reply-to=<identifier>:: 95 Make the first mail (or all the mails with `--no-thread`) appear as a 96 + reply to the given Message-ID, which avoids breaking threads to 97 provide a new patch series. 98 The second and subsequent emails will be sent as replies according to 99 the `--[no-]chain-reply-to` setting.
+2 -2
git-send-email.perl
··· 1530 To: $to${ccline} 1531 Subject: $subject 1532 Date: $date 1533 - Message-Id: $message_id 1534 "; 1535 if ($use_xmailer) { 1536 $header .= "X-Mailer: git-send-email $gitversion\n"; ··· 1825 $has_mime_version = 1; 1826 push @xh, $_; 1827 } 1828 - elsif (/^Message-Id: (.*)/i) { 1829 $message_id = $1; 1830 } 1831 elsif (/^Content-Transfer-Encoding: (.*)/i) {
··· 1530 To: $to${ccline} 1531 Subject: $subject 1532 Date: $date 1533 + Message-ID: $message_id 1534 "; 1535 if ($use_xmailer) { 1536 $header .= "X-Mailer: git-send-email $gitversion\n"; ··· 1825 $has_mime_version = 1; 1826 push @xh, $_; 1827 } 1828 + elsif (/^Message-ID: (.*)/i) { 1829 $message_id = $1; 1830 } 1831 elsif (/^Content-Transfer-Encoding: (.*)/i) {
+1 -1
log-tree.c
··· 440 fprintf(opt->diffopt.file, "From %s Mon Sep 17 00:00:00 2001\n", name); 441 graph_show_oneline(opt->graph); 442 if (opt->message_id) { 443 - fprintf(opt->diffopt.file, "Message-Id: <%s>\n", opt->message_id); 444 graph_show_oneline(opt->graph); 445 } 446 if (opt->ref_message_ids && opt->ref_message_ids->nr > 0) {
··· 440 fprintf(opt->diffopt.file, "From %s Mon Sep 17 00:00:00 2001\n", name); 441 graph_show_oneline(opt->graph); 442 if (opt->message_id) { 443 + fprintf(opt->diffopt.file, "Message-ID: <%s>\n", opt->message_id); 444 graph_show_oneline(opt->graph); 445 } 446 if (opt->ref_message_ids && opt->ref_message_ids->nr > 0) {
+2 -2
mailinfo.c
··· 597 ret = 1; 598 goto check_header_out; 599 } 600 - if (parse_header(line, "Message-Id", mi, &sb)) { 601 if (mi->add_message_id) 602 mi->message_id = strbuf_detach(&sb, NULL); 603 ret = 1; ··· 829 if (patchbreak(line)) { 830 if (mi->message_id) 831 strbuf_addf(&mi->log_message, 832 - "Message-Id: %s\n", mi->message_id); 833 return 1; 834 } 835
··· 597 ret = 1; 598 goto check_header_out; 599 } 600 + if (parse_header(line, "Message-ID", mi, &sb)) { 601 if (mi->add_message_id) 602 mi->message_id = strbuf_detach(&sb, NULL); 603 ret = 1; ··· 829 if (patchbreak(line)) { 830 if (mi->message_id) 831 strbuf_addf(&mi->log_message, 832 + "Message-ID: %s\n", mi->message_id); 833 return 1; 834 } 835
+28 -28
t/t4014-format-patch.sh
··· 445 446 cat >expect.thread <<EOF 447 --- 448 - Message-Id: <0> 449 --- 450 - Message-Id: <1> 451 In-Reply-To: <0> 452 References: <0> 453 --- 454 - Message-Id: <2> 455 In-Reply-To: <0> 456 References: <0> 457 EOF ··· 462 463 cat >expect.in-reply-to <<EOF 464 --- 465 - Message-Id: <0> 466 In-Reply-To: <1> 467 References: <1> 468 --- 469 - Message-Id: <2> 470 In-Reply-To: <1> 471 References: <1> 472 --- 473 - Message-Id: <3> 474 In-Reply-To: <1> 475 References: <1> 476 EOF ··· 482 483 cat >expect.cover-letter <<EOF 484 --- 485 - Message-Id: <0> 486 --- 487 - Message-Id: <1> 488 In-Reply-To: <0> 489 References: <0> 490 --- 491 - Message-Id: <2> 492 In-Reply-To: <0> 493 References: <0> 494 --- 495 - Message-Id: <3> 496 In-Reply-To: <0> 497 References: <0> 498 EOF ··· 503 504 cat >expect.cl-irt <<EOF 505 --- 506 - Message-Id: <0> 507 In-Reply-To: <1> 508 References: <1> 509 --- 510 - Message-Id: <2> 511 In-Reply-To: <0> 512 References: <1> 513 <0> 514 --- 515 - Message-Id: <3> 516 In-Reply-To: <0> 517 References: <1> 518 <0> 519 --- 520 - Message-Id: <4> 521 In-Reply-To: <0> 522 References: <1> 523 <0> ··· 535 536 cat >expect.deep <<EOF 537 --- 538 - Message-Id: <0> 539 --- 540 - Message-Id: <1> 541 In-Reply-To: <0> 542 References: <0> 543 --- 544 - Message-Id: <2> 545 In-Reply-To: <1> 546 References: <0> 547 <1> ··· 553 554 cat >expect.deep-irt <<EOF 555 --- 556 - Message-Id: <0> 557 In-Reply-To: <1> 558 References: <1> 559 --- 560 - Message-Id: <2> 561 In-Reply-To: <0> 562 References: <1> 563 <0> 564 --- 565 - Message-Id: <3> 566 In-Reply-To: <2> 567 References: <1> 568 <0> ··· 576 577 cat >expect.deep-cl <<EOF 578 --- 579 - Message-Id: <0> 580 --- 581 - Message-Id: <1> 582 In-Reply-To: <0> 583 References: <0> 584 --- 585 - Message-Id: <2> 586 In-Reply-To: <1> 587 References: <0> 588 <1> 589 --- 590 - Message-Id: <3> 591 In-Reply-To: <2> 592 References: <0> 593 <1> ··· 600 601 cat >expect.deep-cl-irt <<EOF 602 --- 603 - Message-Id: <0> 604 In-Reply-To: <1> 605 References: <1> 606 --- 607 - Message-Id: <2> 608 In-Reply-To: <0> 609 References: <1> 610 <0> 611 --- 612 - Message-Id: <3> 613 In-Reply-To: <2> 614 References: <1> 615 <0> 616 <2> 617 --- 618 - Message-Id: <4> 619 In-Reply-To: <3> 620 References: <1> 621 <0>
··· 445 446 cat >expect.thread <<EOF 447 --- 448 + Message-ID: <0> 449 --- 450 + Message-ID: <1> 451 In-Reply-To: <0> 452 References: <0> 453 --- 454 + Message-ID: <2> 455 In-Reply-To: <0> 456 References: <0> 457 EOF ··· 462 463 cat >expect.in-reply-to <<EOF 464 --- 465 + Message-ID: <0> 466 In-Reply-To: <1> 467 References: <1> 468 --- 469 + Message-ID: <2> 470 In-Reply-To: <1> 471 References: <1> 472 --- 473 + Message-ID: <3> 474 In-Reply-To: <1> 475 References: <1> 476 EOF ··· 482 483 cat >expect.cover-letter <<EOF 484 --- 485 + Message-ID: <0> 486 --- 487 + Message-ID: <1> 488 In-Reply-To: <0> 489 References: <0> 490 --- 491 + Message-ID: <2> 492 In-Reply-To: <0> 493 References: <0> 494 --- 495 + Message-ID: <3> 496 In-Reply-To: <0> 497 References: <0> 498 EOF ··· 503 504 cat >expect.cl-irt <<EOF 505 --- 506 + Message-ID: <0> 507 In-Reply-To: <1> 508 References: <1> 509 --- 510 + Message-ID: <2> 511 In-Reply-To: <0> 512 References: <1> 513 <0> 514 --- 515 + Message-ID: <3> 516 In-Reply-To: <0> 517 References: <1> 518 <0> 519 --- 520 + Message-ID: <4> 521 In-Reply-To: <0> 522 References: <1> 523 <0> ··· 535 536 cat >expect.deep <<EOF 537 --- 538 + Message-ID: <0> 539 --- 540 + Message-ID: <1> 541 In-Reply-To: <0> 542 References: <0> 543 --- 544 + Message-ID: <2> 545 In-Reply-To: <1> 546 References: <0> 547 <1> ··· 553 554 cat >expect.deep-irt <<EOF 555 --- 556 + Message-ID: <0> 557 In-Reply-To: <1> 558 References: <1> 559 --- 560 + Message-ID: <2> 561 In-Reply-To: <0> 562 References: <1> 563 <0> 564 --- 565 + Message-ID: <3> 566 In-Reply-To: <2> 567 References: <1> 568 <0> ··· 576 577 cat >expect.deep-cl <<EOF 578 --- 579 + Message-ID: <0> 580 --- 581 + Message-ID: <1> 582 In-Reply-To: <0> 583 References: <0> 584 --- 585 + Message-ID: <2> 586 In-Reply-To: <1> 587 References: <0> 588 <1> 589 --- 590 + Message-ID: <3> 591 In-Reply-To: <2> 592 References: <0> 593 <1> ··· 600 601 cat >expect.deep-cl-irt <<EOF 602 --- 603 + Message-ID: <0> 604 In-Reply-To: <1> 605 References: <1> 606 --- 607 + Message-ID: <2> 608 In-Reply-To: <0> 609 References: <1> 610 <0> 611 --- 612 + Message-ID: <3> 613 In-Reply-To: <2> 614 References: <1> 615 <0> 616 <2> 617 --- 618 + Message-ID: <4> 619 In-Reply-To: <3> 620 References: <1> 621 <0>
+4 -4
t/t4150-am.sh
··· 103 104 git format-patch --stdout first >patch1 && 105 { 106 - echo "Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>" && 107 echo "X-Fake-Field: Line One" && 108 echo "X-Fake-Field: Line Two" && 109 echo "X-Fake-Field: Line Three" && ··· 910 git am --message-id patch1.eml && 911 test_path_is_missing .git/rebase-apply && 912 git cat-file commit HEAD | tail -n1 >actual && 913 - grep Message-Id patch1.eml >expected && 914 test_cmp expected actual 915 ' 916 ··· 922 git am patch1.eml && 923 test_path_is_missing .git/rebase-apply && 924 git cat-file commit HEAD | tail -n1 >actual && 925 - grep Message-Id patch1.eml >expected && 926 test_cmp expected actual 927 ' 928 ··· 933 git am -s --message-id patch1.eml && 934 test_path_is_missing .git/rebase-apply && 935 git cat-file commit HEAD | tail -n2 | head -n1 >actual && 936 - grep Message-Id patch1.eml >expected && 937 test_cmp expected actual 938 ' 939
··· 103 104 git format-patch --stdout first >patch1 && 105 { 106 + echo "Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>" && 107 echo "X-Fake-Field: Line One" && 108 echo "X-Fake-Field: Line Two" && 109 echo "X-Fake-Field: Line Three" && ··· 910 git am --message-id patch1.eml && 911 test_path_is_missing .git/rebase-apply && 912 git cat-file commit HEAD | tail -n1 >actual && 913 + grep Message-ID patch1.eml >expected && 914 test_cmp expected actual 915 ' 916 ··· 922 git am patch1.eml && 923 test_path_is_missing .git/rebase-apply && 924 git cat-file commit HEAD | tail -n1 >actual && 925 + grep Message-ID patch1.eml >expected && 926 test_cmp expected actual 927 ' 928 ··· 933 git am -s --message-id patch1.eml && 934 test_path_is_missing .git/rebase-apply && 935 git cat-file commit HEAD | tail -n2 | head -n1 >actual && 936 + grep Message-ID patch1.eml >expected && 937 test_cmp expected actual 938 ' 939
+1 -1
t/t4258/mbox
··· 2 To: list@example.org 3 Subject: [PATCH v2] sample 4 Date: Mon, 3 Aug 2020 22:40:55 +0700 5 - Message-Id: <msg-id@example.com> 6 Content-Type: text/plain; charset="utf-8" 7 Content-Transfer-Encoding: base64 8
··· 2 To: list@example.org 3 Subject: [PATCH v2] sample 4 Date: Mon, 3 Aug 2020 22:40:55 +0700 5 + Message-ID: <msg-id@example.com> 6 Content-Type: text/plain; charset="utf-8" 7 Content-Transfer-Encoding: base64 8
+1 -1
t/t5100/msg0002
··· 3 4 From: Nit Picker <nit.picker@example.net> 5 Subject: foo is too old 6 - Message-Id: <nitpicker.12121212@example.net> 7 8 Hopefully this would fix the problem stated there. 9
··· 3 4 From: Nit Picker <nit.picker@example.net> 5 Subject: foo is too old 6 + Message-ID: <nitpicker.12121212@example.net> 7 8 Hopefully this would fix the problem stated there. 9
+1 -1
t/t5100/msg0003
··· 3 4 From: Nit Picker <nit.picker@example.net> 5 Subject: foo is too old 6 - Message-Id: <nitpicker.12121212@example.net> 7 8 Hopefully this would fix the problem stated there. 9
··· 3 4 From: Nit Picker <nit.picker@example.net> 5 Subject: foo is too old 6 + Message-ID: <nitpicker.12121212@example.net> 7 8 Hopefully this would fix the problem stated there. 9
+1 -1
t/t5100/msg0012--message-id
··· 5 python-docutils. В то время как сам rest2web не нужен. 6 7 Signed-off-by: Dmitriy Blinov <bda@mnsspb.ru> 8 - Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>
··· 5 python-docutils. В то время как сам rest2web не нужен. 6 7 Signed-off-by: Dmitriy Blinov <bda@mnsspb.ru> 8 + Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>
+2 -2
t/t5100/quoted-cr.mbox
··· 3 To: list@example.org 4 Subject: [PATCH v2] sample 5 Date: Mon, 3 Aug 2020 22:40:55 +0700 6 - Message-Id: <msg-id@example.com> 7 Content-Type: text/plain; charset="utf-8" 8 Content-Transfer-Encoding: base64 9 ··· 27 To: list@example.org 28 Subject: [PATCH v2] sample 29 Date: Mon, 3 Aug 2020 22:40:55 +0700 30 - Message-Id: <msg-id2@example.com> 31 Content-Type: text/plain; charset="utf-8" 32 Content-Transfer-Encoding: base64 33
··· 3 To: list@example.org 4 Subject: [PATCH v2] sample 5 Date: Mon, 3 Aug 2020 22:40:55 +0700 6 + Message-ID: <msg-id@example.com> 7 Content-Type: text/plain; charset="utf-8" 8 Content-Transfer-Encoding: base64 9 ··· 27 To: list@example.org 28 Subject: [PATCH v2] sample 29 Date: Mon, 3 Aug 2020 22:40:55 +0700 30 + Message-ID: <msg-id2@example.com> 31 Content-Type: text/plain; charset="utf-8" 32 Content-Transfer-Encoding: base64 33
+3 -3
t/t5100/sample.mbox
··· 35 36 From: Nit Picker <nit.picker@example.net> 37 Subject: foo is too old 38 - Message-Id: <nitpicker.12121212@example.net> 39 40 Hopefully this would fix the problem stated there. 41 ··· 78 79 From: Nit Picker <nit.picker@example.net> 80 Subject: foo is too old 81 - Message-Id: <nitpicker.12121212@example.net> 82 83 Hopefully this would fix the problem stated there. 84 ··· 508 From: Dmitriy Blinov <bda@mnsspb.ru> 509 To: navy-patches@dinar.mns.mnsspb.ru 510 Date: Wed, 12 Nov 2008 17:54:41 +0300 511 - Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru> 512 X-Mailer: git-send-email 1.5.6.5 513 MIME-Version: 1.0 514 Content-Type: text/plain;
··· 35 36 From: Nit Picker <nit.picker@example.net> 37 Subject: foo is too old 38 + Message-ID: <nitpicker.12121212@example.net> 39 40 Hopefully this would fix the problem stated there. 41 ··· 78 79 From: Nit Picker <nit.picker@example.net> 80 Subject: foo is too old 81 + Message-ID: <nitpicker.12121212@example.net> 82 83 Hopefully this would fix the problem stated there. 84 ··· 508 From: Dmitriy Blinov <bda@mnsspb.ru> 509 To: navy-patches@dinar.mns.mnsspb.ru 510 Date: Wed, 12 Nov 2008 17:54:41 +0300 511 + Message-ID: <1226501681-24923-1-git-send-email-bda@mnsspb.ru> 512 X-Mailer: git-send-email 1.5.6.5 513 MIME-Version: 1.0 514 Content-Type: text/plain;
+19 -19
t/t9001-send-email.sh
··· 12 13 replace_variable_fields () { 14 sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \ 15 - -e "s/^\(Message-Id:\).*/\1 MESSAGE-ID-STRING/" \ 16 -e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" 17 } 18 ··· 225 two@example.com 226 Subject: [PATCH 1/1] Second. 227 Date: DATE-STRING 228 - Message-Id: MESSAGE-ID-STRING 229 X-Mailer: X-MAILER-STRING 230 In-Reply-To: <unique-message-id@example.com> 231 References: <unique-message-id@example.com> ··· 617 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && 618 test_cmp expect actual && 619 # Second and subsequent messages are replies to the first one 620 - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt1 >expect && 621 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && 622 test_cmp expect actual && 623 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual && ··· 637 2>errors && 638 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && 639 test_cmp expect actual && 640 - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt1 >expect && 641 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && 642 test_cmp expect actual && 643 - sed -n -e "s/^Message-Id: *\(.*\)/\1/p" msgtxt2 >expect && 644 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual && 645 test_cmp expect actual 646 ' ··· 713 two@example.com 714 Subject: [PATCH 1/1] Second. 715 Date: DATE-STRING 716 - Message-Id: MESSAGE-ID-STRING 717 X-Mailer: X-MAILER-STRING 718 MIME-Version: 1.0 719 Content-Transfer-Encoding: 8bit ··· 759 two@example.com 760 Subject: [PATCH 1/1] Second. 761 Date: DATE-STRING 762 - Message-Id: MESSAGE-ID-STRING 763 X-Mailer: X-MAILER-STRING 764 MIME-Version: 1.0 765 Content-Transfer-Encoding: 8bit ··· 796 C O Mitter <committer@example.com> 797 Subject: [PATCH 1/1] Second. 798 Date: DATE-STRING 799 - Message-Id: MESSAGE-ID-STRING 800 X-Mailer: X-MAILER-STRING 801 MIME-Version: 1.0 802 Content-Transfer-Encoding: 8bit ··· 824 To: to@example.com 825 Subject: [PATCH 1/1] Second. 826 Date: DATE-STRING 827 - Message-Id: MESSAGE-ID-STRING 828 X-Mailer: X-MAILER-STRING 829 MIME-Version: 1.0 830 Content-Transfer-Encoding: 8bit ··· 860 cc-cmd@example.com 861 Subject: [PATCH 1/1] Second. 862 Date: DATE-STRING 863 - Message-Id: MESSAGE-ID-STRING 864 X-Mailer: X-MAILER-STRING 865 MIME-Version: 1.0 866 Content-Transfer-Encoding: 8bit ··· 893 two@example.com 894 Subject: [PATCH 1/1] Second. 895 Date: DATE-STRING 896 - Message-Id: MESSAGE-ID-STRING 897 X-Mailer: X-MAILER-STRING 898 MIME-Version: 1.0 899 Content-Transfer-Encoding: 8bit ··· 926 two@example.com 927 Subject: [PATCH 1/1] Second. 928 Date: DATE-STRING 929 - Message-Id: MESSAGE-ID-STRING 930 X-Mailer: X-MAILER-STRING 931 MIME-Version: 1.0 932 Content-Transfer-Encoding: 8bit ··· 963 C O Mitter <committer@example.com> 964 Subject: [PATCH 1/1] Second. 965 Date: DATE-STRING 966 - Message-Id: MESSAGE-ID-STRING 967 X-Mailer: X-MAILER-STRING 968 MIME-Version: 1.0 969 Content-Transfer-Encoding: 8bit ··· 993 C O Mitter <committer@example.com> 994 Subject: [PATCH 1/1] Second. 995 Date: DATE-STRING 996 - Message-Id: MESSAGE-ID-STRING 997 X-Mailer: X-MAILER-STRING 998 MIME-Version: 1.0 999 Content-Transfer-Encoding: 8bit ··· 1478 test_expect_success $PREREQ 'setup expect' ' 1479 cat >email-using-8bit <<\EOF 1480 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1481 - Message-Id: <bogus-message-id@example.com> 1482 From: author@example.com 1483 Date: Sat, 12 Jun 2010 15:53:58 +0200 1484 Subject: subject goes here ··· 1564 test_expect_success $PREREQ 'setup expect' ' 1565 cat >email-using-8bit <<-\EOF 1566 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1567 - Message-Id: <bogus-message-id@example.com> 1568 From: author@example.com 1569 Date: Sat, 12 Jun 2010 15:53:58 +0200 1570 Subject: Dieser Betreff enthält auch einen Umlaut! ··· 1593 test_expect_success $PREREQ 'setup expect' ' 1594 cat >email-using-8bit <<-\EOF 1595 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1596 - Message-Id: <bogus-message-id@example.com> 1597 From: A U Thor <author@example.com> 1598 Date: Sat, 12 Jun 2010 15:53:58 +0200 1599 Content-Type: text/plain; charset=UTF-8 ··· 1674 test_expect_success $PREREQ 'setup expect' ' 1675 cat >email-using-qp <<-\EOF 1676 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1677 - Message-Id: <bogus-message-id@example.com> 1678 From: A U Thor <author@example.com> 1679 Date: Sat, 12 Jun 2010 15:53:58 +0200 1680 MIME-Version: 1.0 ··· 1700 test_expect_success $PREREQ 'setup expect' " 1701 tr -d '\\015' | tr '%' '\\015' >email-using-crlf <<EOF 1702 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1703 - Message-Id: <bogus-message-id@example.com> 1704 From: A U Thor <author@example.com> 1705 Date: Sat, 12 Jun 2010 15:53:58 +0200 1706 Content-Type: text/plain; charset=UTF-8
··· 12 13 replace_variable_fields () { 14 sed -e "s/^\(Date:\).*/\1 DATE-STRING/" \ 15 + -e "s/^\(Message-ID:\).*/\1 MESSAGE-ID-STRING/" \ 16 -e "s/^\(X-Mailer:\).*/\1 X-MAILER-STRING/" 17 } 18 ··· 225 two@example.com 226 Subject: [PATCH 1/1] Second. 227 Date: DATE-STRING 228 + Message-ID: MESSAGE-ID-STRING 229 X-Mailer: X-MAILER-STRING 230 In-Reply-To: <unique-message-id@example.com> 231 References: <unique-message-id@example.com> ··· 617 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && 618 test_cmp expect actual && 619 # Second and subsequent messages are replies to the first one 620 + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt1 >expect && 621 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && 622 test_cmp expect actual && 623 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual && ··· 637 2>errors && 638 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt1 >actual && 639 test_cmp expect actual && 640 + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt1 >expect && 641 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt2 >actual && 642 test_cmp expect actual && 643 + sed -n -e "s/^Message-ID: *\(.*\)/\1/p" msgtxt2 >expect && 644 sed -n -e "s/^In-Reply-To: *\(.*\)/\1/p" msgtxt3 >actual && 645 test_cmp expect actual 646 ' ··· 713 two@example.com 714 Subject: [PATCH 1/1] Second. 715 Date: DATE-STRING 716 + Message-ID: MESSAGE-ID-STRING 717 X-Mailer: X-MAILER-STRING 718 MIME-Version: 1.0 719 Content-Transfer-Encoding: 8bit ··· 759 two@example.com 760 Subject: [PATCH 1/1] Second. 761 Date: DATE-STRING 762 + Message-ID: MESSAGE-ID-STRING 763 X-Mailer: X-MAILER-STRING 764 MIME-Version: 1.0 765 Content-Transfer-Encoding: 8bit ··· 796 C O Mitter <committer@example.com> 797 Subject: [PATCH 1/1] Second. 798 Date: DATE-STRING 799 + Message-ID: MESSAGE-ID-STRING 800 X-Mailer: X-MAILER-STRING 801 MIME-Version: 1.0 802 Content-Transfer-Encoding: 8bit ··· 824 To: to@example.com 825 Subject: [PATCH 1/1] Second. 826 Date: DATE-STRING 827 + Message-ID: MESSAGE-ID-STRING 828 X-Mailer: X-MAILER-STRING 829 MIME-Version: 1.0 830 Content-Transfer-Encoding: 8bit ··· 860 cc-cmd@example.com 861 Subject: [PATCH 1/1] Second. 862 Date: DATE-STRING 863 + Message-ID: MESSAGE-ID-STRING 864 X-Mailer: X-MAILER-STRING 865 MIME-Version: 1.0 866 Content-Transfer-Encoding: 8bit ··· 893 two@example.com 894 Subject: [PATCH 1/1] Second. 895 Date: DATE-STRING 896 + Message-ID: MESSAGE-ID-STRING 897 X-Mailer: X-MAILER-STRING 898 MIME-Version: 1.0 899 Content-Transfer-Encoding: 8bit ··· 926 two@example.com 927 Subject: [PATCH 1/1] Second. 928 Date: DATE-STRING 929 + Message-ID: MESSAGE-ID-STRING 930 X-Mailer: X-MAILER-STRING 931 MIME-Version: 1.0 932 Content-Transfer-Encoding: 8bit ··· 963 C O Mitter <committer@example.com> 964 Subject: [PATCH 1/1] Second. 965 Date: DATE-STRING 966 + Message-ID: MESSAGE-ID-STRING 967 X-Mailer: X-MAILER-STRING 968 MIME-Version: 1.0 969 Content-Transfer-Encoding: 8bit ··· 993 C O Mitter <committer@example.com> 994 Subject: [PATCH 1/1] Second. 995 Date: DATE-STRING 996 + Message-ID: MESSAGE-ID-STRING 997 X-Mailer: X-MAILER-STRING 998 MIME-Version: 1.0 999 Content-Transfer-Encoding: 8bit ··· 1478 test_expect_success $PREREQ 'setup expect' ' 1479 cat >email-using-8bit <<\EOF 1480 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1481 + Message-ID: <bogus-message-id@example.com> 1482 From: author@example.com 1483 Date: Sat, 12 Jun 2010 15:53:58 +0200 1484 Subject: subject goes here ··· 1564 test_expect_success $PREREQ 'setup expect' ' 1565 cat >email-using-8bit <<-\EOF 1566 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1567 + Message-ID: <bogus-message-id@example.com> 1568 From: author@example.com 1569 Date: Sat, 12 Jun 2010 15:53:58 +0200 1570 Subject: Dieser Betreff enthält auch einen Umlaut! ··· 1593 test_expect_success $PREREQ 'setup expect' ' 1594 cat >email-using-8bit <<-\EOF 1595 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1596 + Message-ID: <bogus-message-id@example.com> 1597 From: A U Thor <author@example.com> 1598 Date: Sat, 12 Jun 2010 15:53:58 +0200 1599 Content-Type: text/plain; charset=UTF-8 ··· 1674 test_expect_success $PREREQ 'setup expect' ' 1675 cat >email-using-qp <<-\EOF 1676 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1677 + Message-ID: <bogus-message-id@example.com> 1678 From: A U Thor <author@example.com> 1679 Date: Sat, 12 Jun 2010 15:53:58 +0200 1680 MIME-Version: 1.0 ··· 1700 test_expect_success $PREREQ 'setup expect' " 1701 tr -d '\\015' | tr '%' '\\015' >email-using-crlf <<EOF 1702 From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001 1703 + Message-ID: <bogus-message-id@example.com> 1704 From: A U Thor <author@example.com> 1705 Date: Sat, 12 Jun 2010 15:53:58 +0200 1706 Content-Type: text/plain; charset=UTF-8