summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2010-06-16 05:59:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-06-16 17:08:59 (GMT)
commit6622d9c7103525bb8673f93df4104ab2a46cb174 (patch)
tree627447656621a876401a1739f431518468531031 /Documentation
parent6068cdcc832040ac644c56953be0670bb09afd12 (diff)
downloadgit-6622d9c7103525bb8673f93df4104ab2a46cb174.zip
git-6622d9c7103525bb8673f93df4104ab2a46cb174.tar.gz
git-6622d9c7103525bb8673f93df4104ab2a46cb174.tar.bz2
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 <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt6
-rw-r--r--Documentation/git-format-patch.txt7
2 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 95cf73c..be6e85d 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 835fb71..c8c81e8 100644
--- a/Documentation/git-format-patch.txt
+++ b/Documentation/git-format-patch.txt
@@ -13,6 +13,7 @@ SYNOPSIS
[--no-thread | --thread[=<style>]]
[(--attach|--inline)[=<boundary>] | --no-attach]
[-s | --signoff]
+ [--signature=<signature> | --no-signature]
[-n | --numbered | -N | --no-numbered]
[--start-number <n>] [--numbered-files]
[--in-reply-to=Message-Id] [--suffix=.<sfx>]
@@ -180,6 +181,12 @@ will want to ensure that threading is disabled for `git send-email`.
containing the shortlog and the overall diffstat. You can
fill in a description in the file before sending it out.
+--[no]-signature=<signature>::
+ Add a signature to each message produced. Per RFC 3676 the signature
+ is separated from the body by a line with '-- ' on it. If the
+ signature option is omitted the signature defaults to the git version
+ number.
+
--suffix=.<sfx>::
Instead of using `.patch` as the suffix for generated
filenames, use specified suffix. A common alternative is