Skip to content

Commit ba4324c

Browse files
committed
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 <[email protected]> Reviewed-by: Elijah Newren <[email protected]>
1 parent 57e2c6e commit ba4324c

15 files changed

+75
-75
lines changed

Documentation/MyFirstContribution.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,21 +1171,21 @@ between your last version and now, if it's something significant. You do not
11711171
need the exact same body in your second cover letter; focus on explaining to
11721172
reviewers the changes you've made that may not be as visible.
11731173

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.
11751175
You can either note it when you send the first series, from the output of `git
11761176
send-email`, or you can look it up on the
11771177
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
11791179
header. It should match:
11801180

11811181
----
1182-
Message-Id: <[email protected]>
1182+
Message-ID: <[email protected]>
11831183
----
11841184

1185-
Your Message-Id is `<[email protected]>`. 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 `<[email protected]>`. 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.
11891189

11901190
While you're looking at the email, you should also note who is CC'd, as it's
11911191
common practice in the mailing list to keep all CCs on a thread. You can add

Documentation/git-format-patch.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To omit patch numbers from the subject, use `-N`.
9999

100100
If given `--thread`, `git-format-patch` will generate `In-Reply-To` and
101101
`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
103103
reference.
104104

105105
OPTIONS
@@ -163,7 +163,7 @@ include::diff-options.txt[]
163163
--no-thread::
164164
Controls addition of `In-Reply-To` and `References` headers to
165165
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
167167
reference.
168168
+
169169
The optional <style> argument can be either `shallow` or `deep`.

Documentation/git-send-email.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ See the CONFIGURATION section for `sendemail.multiEdit`.
9393

9494
--in-reply-to=<identifier>::
9595
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
9797
provide a new patch series.
9898
The second and subsequent emails will be sent as replies according to
9999
the `--[no-]chain-reply-to` setting.

git-send-email.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ sub send_message {
15301530
To: $to${ccline}
15311531
Subject: $subject
15321532
Date: $date
1533-
Message-Id: $message_id
1533+
Message-ID: $message_id
15341534
";
15351535
if ($use_xmailer) {
15361536
$header .= "X-Mailer: git-send-email $gitversion\n";
@@ -1825,7 +1825,7 @@ sub process_file {
18251825
$has_mime_version = 1;
18261826
push @xh, $_;
18271827
}
1828-
elsif (/^Message-Id: (.*)/i) {
1828+
elsif (/^Message-ID: (.*)/i) {
18291829
$message_id = $1;
18301830
}
18311831
elsif (/^Content-Transfer-Encoding: (.*)/i) {

log-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ void log_write_email_headers(struct rev_info *opt, struct commit *commit,
440440
fprintf(opt->diffopt.file, "From %s Mon Sep 17 00:00:00 2001\n", name);
441441
graph_show_oneline(opt->graph);
442442
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);
444444
graph_show_oneline(opt->graph);
445445
}
446446
if (opt->ref_message_ids && opt->ref_message_ids->nr > 0) {

mailinfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ static int check_header(struct mailinfo *mi,
597597
ret = 1;
598598
goto check_header_out;
599599
}
600-
if (parse_header(line, "Message-Id", mi, &sb)) {
600+
if (parse_header(line, "Message-ID", mi, &sb)) {
601601
if (mi->add_message_id)
602602
mi->message_id = strbuf_detach(&sb, NULL);
603603
ret = 1;
@@ -829,7 +829,7 @@ static int handle_commit_msg(struct mailinfo *mi, struct strbuf *line)
829829
if (patchbreak(line)) {
830830
if (mi->message_id)
831831
strbuf_addf(&mi->log_message,
832-
"Message-Id: %s\n", mi->message_id);
832+
"Message-ID: %s\n", mi->message_id);
833833
return 1;
834834
}
835835

t/t4014-format-patch.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,13 @@ test_expect_success 'no threading' '
445445

446446
cat >expect.thread <<EOF
447447
---
448-
Message-Id: <0>
448+
Message-ID: <0>
449449
---
450-
Message-Id: <1>
450+
Message-ID: <1>
451451
In-Reply-To: <0>
452452
References: <0>
453453
---
454-
Message-Id: <2>
454+
Message-ID: <2>
455455
In-Reply-To: <0>
456456
References: <0>
457457
EOF
@@ -462,15 +462,15 @@ test_expect_success 'thread' '
462462

463463
cat >expect.in-reply-to <<EOF
464464
---
465-
Message-Id: <0>
465+
Message-ID: <0>
466466
In-Reply-To: <1>
467467
References: <1>
468468
---
469-
Message-Id: <2>
469+
Message-ID: <2>
470470
In-Reply-To: <1>
471471
References: <1>
472472
---
473-
Message-Id: <3>
473+
Message-ID: <3>
474474
In-Reply-To: <1>
475475
References: <1>
476476
EOF
@@ -482,17 +482,17 @@ test_expect_success 'thread in-reply-to' '
482482

483483
cat >expect.cover-letter <<EOF
484484
---
485-
Message-Id: <0>
485+
Message-ID: <0>
486486
---
487-
Message-Id: <1>
487+
Message-ID: <1>
488488
In-Reply-To: <0>
489489
References: <0>
490490
---
491-
Message-Id: <2>
491+
Message-ID: <2>
492492
In-Reply-To: <0>
493493
References: <0>
494494
---
495-
Message-Id: <3>
495+
Message-ID: <3>
496496
In-Reply-To: <0>
497497
References: <0>
498498
EOF
@@ -503,21 +503,21 @@ test_expect_success 'thread cover-letter' '
503503

504504
cat >expect.cl-irt <<EOF
505505
---
506-
Message-Id: <0>
506+
Message-ID: <0>
507507
In-Reply-To: <1>
508508
References: <1>
509509
---
510-
Message-Id: <2>
510+
Message-ID: <2>
511511
In-Reply-To: <0>
512512
References: <1>
513513
<0>
514514
---
515-
Message-Id: <3>
515+
Message-ID: <3>
516516
In-Reply-To: <0>
517517
References: <1>
518518
<0>
519519
---
520-
Message-Id: <4>
520+
Message-ID: <4>
521521
In-Reply-To: <0>
522522
References: <1>
523523
<0>
@@ -535,13 +535,13 @@ test_expect_success 'thread explicit shallow' '
535535

536536
cat >expect.deep <<EOF
537537
---
538-
Message-Id: <0>
538+
Message-ID: <0>
539539
---
540-
Message-Id: <1>
540+
Message-ID: <1>
541541
In-Reply-To: <0>
542542
References: <0>
543543
---
544-
Message-Id: <2>
544+
Message-ID: <2>
545545
In-Reply-To: <1>
546546
References: <0>
547547
<1>
@@ -553,16 +553,16 @@ test_expect_success 'thread deep' '
553553

554554
cat >expect.deep-irt <<EOF
555555
---
556-
Message-Id: <0>
556+
Message-ID: <0>
557557
In-Reply-To: <1>
558558
References: <1>
559559
---
560-
Message-Id: <2>
560+
Message-ID: <2>
561561
In-Reply-To: <0>
562562
References: <1>
563563
<0>
564564
---
565-
Message-Id: <3>
565+
Message-ID: <3>
566566
In-Reply-To: <2>
567567
References: <1>
568568
<0>
@@ -576,18 +576,18 @@ test_expect_success 'thread deep in-reply-to' '
576576

577577
cat >expect.deep-cl <<EOF
578578
---
579-
Message-Id: <0>
579+
Message-ID: <0>
580580
---
581-
Message-Id: <1>
581+
Message-ID: <1>
582582
In-Reply-To: <0>
583583
References: <0>
584584
---
585-
Message-Id: <2>
585+
Message-ID: <2>
586586
In-Reply-To: <1>
587587
References: <0>
588588
<1>
589589
---
590-
Message-Id: <3>
590+
Message-ID: <3>
591591
In-Reply-To: <2>
592592
References: <0>
593593
<1>
@@ -600,22 +600,22 @@ test_expect_success 'thread deep cover-letter' '
600600

601601
cat >expect.deep-cl-irt <<EOF
602602
---
603-
Message-Id: <0>
603+
Message-ID: <0>
604604
In-Reply-To: <1>
605605
References: <1>
606606
---
607-
Message-Id: <2>
607+
Message-ID: <2>
608608
In-Reply-To: <0>
609609
References: <1>
610610
<0>
611611
---
612-
Message-Id: <3>
612+
Message-ID: <3>
613613
In-Reply-To: <2>
614614
References: <1>
615615
<0>
616616
<2>
617617
---
618-
Message-Id: <4>
618+
Message-ID: <4>
619619
In-Reply-To: <3>
620620
References: <1>
621621
<0>

t/t4150-am.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test_expect_success setup '
103103
104104
git format-patch --stdout first >patch1 &&
105105
{
106-
echo "Message-Id: <[email protected]>" &&
106+
echo "Message-ID: <[email protected]>" &&
107107
echo "X-Fake-Field: Line One" &&
108108
echo "X-Fake-Field: Line Two" &&
109109
echo "X-Fake-Field: Line Three" &&
@@ -910,7 +910,7 @@ test_expect_success 'am --message-id really adds the message id' '
910910
git am --message-id patch1.eml &&
911911
test_path_is_missing .git/rebase-apply &&
912912
git cat-file commit HEAD | tail -n1 >actual &&
913-
grep Message-Id patch1.eml >expected &&
913+
grep Message-ID patch1.eml >expected &&
914914
test_cmp expected actual
915915
'
916916

@@ -922,7 +922,7 @@ test_expect_success 'am.messageid really adds the message id' '
922922
git am patch1.eml &&
923923
test_path_is_missing .git/rebase-apply &&
924924
git cat-file commit HEAD | tail -n1 >actual &&
925-
grep Message-Id patch1.eml >expected &&
925+
grep Message-ID patch1.eml >expected &&
926926
test_cmp expected actual
927927
'
928928

@@ -933,7 +933,7 @@ test_expect_success 'am --message-id -s signs off after the message id' '
933933
git am -s --message-id patch1.eml &&
934934
test_path_is_missing .git/rebase-apply &&
935935
git cat-file commit HEAD | tail -n2 | head -n1 >actual &&
936-
grep Message-Id patch1.eml >expected &&
936+
grep Message-ID patch1.eml >expected &&
937937
test_cmp expected actual
938938
'
939939

t/t4258/mbox

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ From: A U Thor <[email protected]>
22
33
Subject: [PATCH v2] sample
44
Date: Mon, 3 Aug 2020 22:40:55 +0700
5-
Message-Id: <[email protected]>
5+
Message-ID: <[email protected]>
66
Content-Type: text/plain; charset="utf-8"
77
Content-Transfer-Encoding: base64
88

t/t5100/msg0002

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message:
33

44
From: Nit Picker <[email protected]>
55
Subject: foo is too old
6-
Message-Id: <[email protected]>
6+
Message-ID: <[email protected]>
77

88
Hopefully this would fix the problem stated there.
99

t/t5100/msg0003

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ message:
33

44
From: Nit Picker <[email protected]>
55
Subject: foo is too old
6-
Message-Id: <[email protected]>
6+
Message-ID: <[email protected]>
77

88
Hopefully this would fix the problem stated there.
99

t/t5100/msg0012--message-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ docutils заменён на python-docutils
55
python-docutils. В то время как сам rest2web не нужен.
66

77
Signed-off-by: Dmitriy Blinov <[email protected]>
8-
Message-Id: <[email protected]>
8+
Message-ID: <[email protected]>

t/t5100/quoted-cr.mbox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ From: A U Thor <[email protected]>
33
44
Subject: [PATCH v2] sample
55
Date: Mon, 3 Aug 2020 22:40:55 +0700
6-
Message-Id: <[email protected]>
6+
Message-ID: <[email protected]>
77
Content-Type: text/plain; charset="utf-8"
88
Content-Transfer-Encoding: base64
99

@@ -27,7 +27,7 @@ From: A U Thor <[email protected]>
2727
2828
Subject: [PATCH v2] sample
2929
Date: Mon, 3 Aug 2020 22:40:55 +0700
30-
Message-Id: <[email protected]>
30+
Message-ID: <[email protected]>
3131
Content-Type: text/plain; charset="utf-8"
3232
Content-Transfer-Encoding: base64
3333

t/t5100/sample.mbox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ message:
3535

3636
From: Nit Picker <[email protected]>
3737
Subject: foo is too old
38-
Message-Id: <[email protected]>
38+
Message-ID: <[email protected]>
3939

4040
Hopefully this would fix the problem stated there.
4141

@@ -78,7 +78,7 @@ message:
7878

7979
From: Nit Picker <[email protected]>
8080
Subject: foo is too old
81-
Message-Id: <[email protected]>
81+
Message-ID: <[email protected]>
8282

8383
Hopefully this would fix the problem stated there.
8484

@@ -508,7 +508,7 @@ From [email protected] Wed Nov 12 17:54:41 2008
508508
From: Dmitriy Blinov <[email protected]>
509509
510510
Date: Wed, 12 Nov 2008 17:54:41 +0300
511-
Message-Id: <[email protected]>
511+
Message-ID: <[email protected]>
512512
X-Mailer: git-send-email 1.5.6.5
513513
MIME-Version: 1.0
514514
Content-Type: text/plain;

0 commit comments

Comments
 (0)