Skip to content

Commit f6be7ed

Browse files
me-andgitster
authored andcommitted
doc/SubmittingPatches: correct subject guidance
The examples and common practice for adding markers such as "RFC" or "v2" to the subject of patch emails is to have them within the same brackets as the "PATCH" text, not after the closing bracket. Further, the practice of `git format-patch` and the like, as well as what appears to be the more common pratice on the mailing list, is to use "[RFC PATCH]", not "[PATCH/RFC]". Update the SubmittingPatches article to match and to reference the `format-patch` helper arguments, and also make some minor text clarifications in the area. Signed-off-by: Adam Dinwoodie <[email protected]> Helped-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb5918a commit f6be7ed

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Documentation/SubmittingPatches

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,26 @@ lose tabs that way if you are not careful.
184184

185185
It is a common convention to prefix your subject line with
186186
[PATCH]. This lets people easily distinguish patches from other
187-
e-mail discussions. Use of additional markers after PATCH and
188-
the closing bracket to mark the nature of the patch is also
189-
encouraged. E.g. [PATCH/RFC] is often used when the patch is
190-
not ready to be applied but it is for discussion, [PATCH v2],
191-
[PATCH v3] etc. are often seen when you are sending an update to
192-
what you have previously sent.
193-
194-
"git format-patch" command follows the best current practice to
187+
e-mail discussions. Use of markers in addition to PATCH within
188+
the brackets to describe the nature of the patch is also
189+
encouraged. E.g. [RFC PATCH] (where RFC stands for "request for
190+
comments") is often used to indicate a patch needs further
191+
discussion before being accepted, [PATCH v2], [PATCH v3] etc.
192+
are often seen when you are sending an update to what you have
193+
previously sent.
194+
195+
The "git format-patch" command follows the best current practice to
195196
format the body of an e-mail message. At the beginning of the
196197
patch should come your commit message, ending with the
197198
Signed-off-by: lines, and a line that consists of three dashes,
198199
followed by the diffstat information and the patch itself. If
199200
you are forwarding a patch from somebody else, optionally, at
200201
the beginning of the e-mail message just before the commit
201202
message starts, you can put a "From: " line to name that person.
203+
To change the default "[PATCH]" in the subject to "[<text>]", use
204+
`git format-patch --subject-prefix=<text>`. As a shortcut, you
205+
can use `--rfc` instead of `--subject-prefix="RFC PATCH"`, or
206+
`-v <n>` instead of `--subject-prefix="PATCH v<n>"`.
202207

203208
You often want to add additional explanation about the patch,
204209
other than the commit message itself. Place such "cover letter"

0 commit comments

Comments
 (0)