Code

War on whitespace
[git.git] / Documentation / git-format-patch.txt
index 59f34b9f0d2f4fe74fa5d90bb53393c88d36476b..647de90361b30aeb39b4b2707a295e21863510ee 100644 (file)
@@ -9,11 +9,14 @@ git-format-patch - Prepare patches for e-mail submission
 SYNOPSIS
 --------
 [verse]
-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]
-                  [-s | --signoff] [--diff-options] [--start-number <n>]
-                  [--in-reply-to=Message-Id] [--suffix=.<sfx>]
-                  [--ignore-if-in-upstream]
-                  <since>[..<until>]
+'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--thread]
+                   [--attach[=<boundary>] | --inline[=<boundary>]]
+                   [-s | --signoff] [<common diff options>]
+                   [--start-number <n>] [--numbered-files]
+                   [--in-reply-to=Message-Id] [--suffix=.<sfx>]
+                   [--ignore-if-in-upstream]
+                   [--subject-prefix=Subject-Prefix]
+                   <since>[..<until>]
 
 DESCRIPTION
 -----------
@@ -28,9 +31,11 @@ gitlink:git-rev-parse[1].
 The output of this command is convenient for e-mail submission or
 for use with gitlink:git-am[1].
 
-Each output file is numbered sequentially from 1, and uses the
+By default, each output file is numbered sequentially from 1, and uses the
 first line of the commit message (massaged for pathname safety) as
-the filename. The names of the output files are printed to standard
+the filename. With the --numbered-files option, the output file names
+will only be numbers, without the first line of the commit appended.
+The names of the output files are printed to standard
 output, unless the --stdout option is specified.
 
 If -o is specified, output files are created in <dir>.  Otherwise
@@ -46,6 +51,8 @@ reference.
 
 OPTIONS
 -------
+include::diff-options.txt[]
+
 -o|--output-directory <dir>::
        Use <dir> to store the resulting files, instead of the
        current working directory.
@@ -56,6 +63,11 @@ OPTIONS
 --start-number <n>::
        Start numbering the patches at <n> instead of 1.
 
+--numbered-files::
+       Output file names will be a simple number sequence
+       without the default first line of the commit appended.
+       Mutually exclusive with the --stdout option.
+
 -k|--keep-subject::
        Do not strip/add '[PATCH]' from the first line of the
        commit log message.
@@ -68,8 +80,15 @@ OPTIONS
        Print all commits to the standard output in mbox format,
        instead of creating a file for each one.
 
---attach::
-       Create attachments instead of inlining patches.
+--attach[=<boundary>]::
+       Create multipart/mixed attachment, the first part of
+       which is the commit message and the patch itself in the
+       second part, with "Content-Disposition: attachment".
+
+--inline[=<boundary>]::
+       Create multipart/mixed attachment, the first part of
+       which is the commit message and the patch itself in the
+       second part, with "Content-Disposition: inline".
 
 --thread::
        Add In-Reply-To and References headers to make the second and
@@ -88,6 +107,12 @@ OPTIONS
        patches being generated, and any patch that matches is
        ignored.
 
+--subject-prefix=<Subject-Prefix>::
+       Instead of the standard '[PATCH]' prefix in the subject
+       line, instead use '[<Subject-Prefix>]'. This
+       allows for useful naming of a patch series, and can be
+       combined with the --numbered option.
+
 --suffix=.<sfx>::
        Instead of using `.patch` as the suffix for generated
        filenames, use specifed suffix.  A common alternative is
@@ -153,4 +178,3 @@ Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
 GIT
 ---
 Part of the gitlink:git[7] suite
-