diff options
Diffstat (limited to 'Documentation/git-format-patch.txt')
-rw-r--r-- | Documentation/git-format-patch.txt | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt index 7426109f62..1f577b8016 100644 --- a/Documentation/git-format-patch.txt +++ b/Documentation/git-format-patch.txt @@ -39,15 +39,11 @@ There are two ways to specify which commits to operate on. REVISIONS" section in linkgit:git-rev-parse[1]) means the commits in the specified range. -A single commit, when interpreted as a <revision range> -expression, means "everything that leads to that commit", but -if you write 'git format-patch <commit>', the previous rule -applies to that command line and you do not get "everything -since the beginning of the time". If you want to format -everything since project inception to one commit, say "git -format-patch \--root <commit>" to make it clear that it is the -latter case. If you want to format a single commit, you can do -this with "git format-patch -1 <commit>". +The first rule takes precedence in the case of a single <commit>. To +apply the second rule, i.e., format everything since the beginning of +history up until <commit>, use the '\--root' option: "git format-patch +\--root <commit>". If you want to format only <commit> itself, you +can do this with "git format-patch -1 <commit>". By default, each output file is numbered sequentially from 1, and uses the first line of the commit message (massaged for pathname safety) as @@ -59,8 +55,10 @@ output, unless the --stdout option is specified. If -o is specified, output files are created in <dir>. Otherwise they are created in the current working directory. -If -n is specified, instead of "[PATCH] Subject", the first line -is formatted as "[PATCH n/m] Subject". +By default, the subject of a single patch is "[PATCH] First Line" and +the subject when multiple patches are output is "[PATCH n/m] First +Line". To force 1/1 to be added for a single patch, use -n. To omit +patch numbers from the subject, use -N If given --thread, 'git-format-patch' will generate In-Reply-To and References headers to make the second and subsequent patch mails appear @@ -82,7 +80,7 @@ include::diff-options.txt[] -n:: --numbered:: - Name output in '[PATCH n/m]' format. + Name output in '[PATCH n/m]' format, even with a single patch. -N:: --no-numbered:: @@ -168,6 +166,13 @@ not add any suffix. applied. By default the contents of changes in those files are encoded in the patch. +--root:: + Treat the revision argument as a <revision range>, even if it + is just a single commit (that would normally be treated as a + <since>). Note that root commits included in the specified + range are always formatted as creation patches, independently + of this flag. + CONFIGURATION ------------- You can specify extra mail header lines to be added to each message |