Skip to content

Commit f693b7e

Browse files
ydirsongitster
authored andcommitted
Improve doc for format-patch threading options.
This hopefully makes the relationship between threading options of format-patch and send-email easier to grasp. Signed-off-by: Yann Dirson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 65180c6 commit f693b7e

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

Documentation/git-format-patch.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SYNOPSIS
1010
--------
1111
[verse]
1212
'git format-patch' [-k] [(-o|--output-directory) <dir> | --stdout]
13-
[--thread[=<style>]]
13+
[--no-thread | --thread[=<style>]]
1414
[(--attach|--inline)[=<boundary>] | --no-attach]
1515
[-s | --signoff]
1616
[-n | --numbered | -N | --no-numbered]
@@ -124,17 +124,25 @@ include::diff-options.txt[]
124124
second part, with "Content-Disposition: inline".
125125

126126
--thread[=<style>]::
127-
Add In-Reply-To and References headers to make the second and
128-
subsequent mails appear as replies to the first. Also generates
129-
the Message-Id header to reference.
127+
--no-thread::
128+
Controls addition of In-Reply-To and References headers to
129+
make the second and subsequent mails appear as replies to the
130+
first. Also controls generation of the Message-Id header to
131+
reference.
130132
+
131133
The optional <style> argument can be either `shallow` or `deep`.
132134
'shallow' threading makes every mail a reply to the head of the
133135
series, where the head is chosen from the cover letter, the
134136
`\--in-reply-to`, and the first patch mail, in this order. 'deep'
135-
threading makes every mail a reply to the previous one. If not
136-
specified, defaults to the 'format.thread' configuration, or `shallow`
137-
if that is not set.
137+
threading makes every mail a reply to the previous one.
138+
+
139+
The default is --no-thread, unless the 'format.thread' configuration
140+
is set. If --thread is specified without a style, it defaults to the
141+
style specified by 'format.thread' if any, or else `shallow`.
142+
+
143+
Beware that the default for 'git send-email' is to thread emails
144+
itself. If you want 'git format-patch' to take care of hreading, you
145+
will want to ensure that threading is disabled for 'git send-email'.
138146

139147
--in-reply-to=Message-Id::
140148
Make the first mail (or all the mails with --no-thread) appear as a

Documentation/git-send-email.txt

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,22 @@ specified, as well as 'body' if --no-signed-off-cc is specified.
212212
value; if that is unspecified, default to --no-suppress-from.
213213

214214
--[no-]thread::
215-
If this is set, the In-Reply-To header will be set on each email sent.
216-
If disabled with "--no-thread", no emails will have the In-Reply-To
217-
header set, unless specified with --in-reply-to.
218-
Default is the value of the 'sendemail.thread' configuration
219-
value; if that is unspecified, default to --thread.
215+
If this is set, the In-Reply-To and References headers will be
216+
added to each email sent. Whether each mail refers to the
217+
previous email (`deep` threading per 'git format-patch'
218+
wording) or to the first email (`shallow` threading) is
219+
governed by "--[no-]chain-reply-to".
220+
+
221+
If disabled with "--no-thread", those headers will not be added
222+
(unless specified with --in-reply-to). Default is the value of the
223+
'sendemail.thread' configuration value; if that is unspecified,
224+
default to --thread.
225+
+
226+
It is up to the user to ensure that no In-Reply-To header already
227+
exists when 'git send-email' is asked to add it (especially note that
228+
'git format-patch' can be configured to do the threading itself).
229+
Failure to do so may not produce the expected result in the
230+
recipient's MUA.
220231

221232

222233
Administering

0 commit comments

Comments
 (0)