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