From bf8e65b30b77308710f14d523782f99a4a23eb55 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 15 Oct 2019 02:06:40 -0700 Subject: format-patch: teach --cover-from-description option Before, when format-patch generated a cover letter, only the body would be populated with a branch's description while the subject would be populated with placeholder text. However, users may want to have the subject of their cover letter automatically populated in the same way. Teach format-patch to accept the `--cover-from-description` option and corresponding `format.coverFromDescription` config, allowing users to populate different parts of the cover letter (including the subject now). Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- Documentation/git-format-patch.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Documentation/git-format-patch.txt') diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 0ac56f4b70..6800e1ab9a 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -19,6 +19,7 @@ SYNOPSIS [--start-number ] [--numbered-files] [--in-reply-to=] [--suffix=.] [--ignore-if-in-upstream] + [--cover-from-description=] [--rfc] [--subject-prefix=] [(--reroll-count|-v) ] [--to=] [--cc=] @@ -171,6 +172,26 @@ will want to ensure that threading is disabled for `git send-email`. patches being generated, and any patch that matches is ignored. +--cover-from-description=:: + Controls which parts of the cover letter will be automatically + populated using the branch's description. ++ +If `` is `message` or `default`, the cover letter subject will be +populated with placeholder text. The body of the cover letter will be +populated with the branch's description. This is the default mode when +no configuration nor command line option is specified. ++ +If `` is `subject`, the first paragraph of the branch description will +populate the cover letter subject. The remainder of the description will +populate the body of the cover letter. ++ +If `` is `auto`, if the first paragraph of the branch description +is greater than 100 bytes, then the mode will be `message`, otherwise +`subject` will be used. ++ +If `` is `none`, both the cover letter subject and body will be +populated with placeholder text. + --subject-prefix=:: Instead of the standard '[PATCH]' prefix in the subject line, instead use '[]'. This @@ -347,6 +368,7 @@ with configuration variables. signOff = true outputDirectory = coverLetter = auto + coverFromDescription = auto ------------ -- cgit v1.3