From ae6c098f158dd306462024c5cb137b8f7f65cfbd Mon Sep 17 00:00:00 2001 From: Steven Drake Date: Wed, 17 Feb 2010 12:39:34 +1300 Subject: Add 'git format-patch --to=' option and 'format.to' configuration variable. Has the same functionality as the '--cc' option and 'format.cc' configuration variable but for the "To:" email header. Half of the code to support this was already there. With email the To: header usually more important than the Cc: header. [jc: tests are by Stephen Boyd] Signed-off-by: Steven Drake Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-format-patch.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Documentation/git-format-patch.txt') diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 9674f9de67..835fb7135b 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -18,7 +18,7 @@ SYNOPSIS [--in-reply-to=Message-Id] [--suffix=.] [--ignore-if-in-upstream] [--subject-prefix=Subject-Prefix] - [--cc=] + [--to=] [--cc=] [--cover-letter] [] [ | ] @@ -162,6 +162,10 @@ will want to ensure that threading is disabled for `git send-email`. allows for useful naming of a patch series, and can be combined with the `--numbered` option. +--to=:: + Add a `To:` header to the email headers. This is in addition + to any configured headers, and may be used multiple times. + --cc=:: Add a `Cc:` header to the email headers. This is in addition to any configured headers, and may be used multiple times. @@ -202,8 +206,8 @@ CONFIGURATION ------------- You can specify extra mail header lines to be added to each message, defaults for the subject prefix and file suffix, number patches when -outputting more than one patch, add "Cc:" headers, configure attachments, -and sign off patches with configuration variables. +outputting more than one patch, add "To" or "Cc:" headers, configure +attachments, and sign off patches with configuration variables. ------------ [format] @@ -211,6 +215,7 @@ and sign off patches with configuration variables. subjectprefix = CHANGE suffix = .txt numbered = auto + to = cc = attach [ = mime-boundary-string ] signoff = true -- cgit v1.3 From 6622d9c7103525bb8673f93df4104ab2a46cb174 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 15 Jun 2010 22:59:25 -0700 Subject: format-patch: Add a signature option (--signature) By default, git uses the version string as the signature for all patches output by format-patch. Many employers (mine included) require the use of a signature on all outgoing mails. In a format-patch | send-email workflow there isn't an easy way to modify the signature without breaking the pipe and manually replacing the version string with the signature required. Instead of doing all that work, add an option (--signature) and a config variable (format.signature) to replace the default git version signature when formatting patches. This does modify the original behavior of format-patch a bit. First off the version string is now placed in the cover letter by default. Secondly, once the configuration variable format.signature is added to the .config file there is no way to revert back to the default git version signature. Instead, specifying the --no-signature option will remove the signature from the patches entirely. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/config.txt | 6 +++ Documentation/git-format-patch.txt | 7 +++ builtin/log.c | 18 ++++++-- ...tch_--stdout_--cover-letter_-n_initial..master^ | 3 ++ t/t4014-format-patch.sh | 52 ++++++++++++++++++++++ 5 files changed, 83 insertions(+), 3 deletions(-) (limited to 'Documentation/git-format-patch.txt') diff --git a/Documentation/config.txt b/Documentation/config.txt index 95cf73cd47..be6e85d6b9 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -880,6 +880,12 @@ format.subjectprefix:: The default for format-patch is to output files with the '[PATCH]' subject prefix. Use this variable to change that prefix. +format.signature:: + The default for format-patch is to output a signature containing + the git version number. Use this variable to change that default. + Set this variable to the empty string ("") to suppress + signature generation. + format.suffix:: The default for format-patch is to output files with the suffix `.patch`. Use this variable to change that suffix (make sure to diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 835fb7135b..c8c81e8437 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -13,6 +13,7 @@ SYNOPSIS [--no-thread | --thread[=