Skip to content

Commit 85b7bd5

Browse files
committed
Merge branch 'tr/maint-1.6.1-doc-format-patch--root'
* tr/maint-1.6.1-doc-format-patch--root: Documentation: format-patch --root clarifications
2 parents 02c62b1 + 2d266f9 commit 85b7bd5

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

Documentation/git-format-patch.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ There are two ways to specify which commits to operate on.
4040
REVISIONS" section in linkgit:git-rev-parse[1]) means the
4141
commits in the specified range.
4242

43-
A single commit, when interpreted as a <revision range>
44-
expression, means "everything that leads to that commit", but
45-
if you write 'git format-patch <commit>', the previous rule
46-
applies to that command line and you do not get "everything
47-
since the beginning of the time". If you want to format
48-
everything since project inception to one commit, say "git
49-
format-patch \--root <commit>" to make it clear that it is the
50-
latter case. If you want to format a single commit, you can do
51-
this with "git format-patch -1 <commit>".
43+
The first rule takes precedence in the case of a single <commit>. To
44+
apply the second rule, i.e., format everything since the beginning of
45+
history up until <commit>, use the '\--root' option: "git format-patch
46+
\--root <commit>". If you want to format only <commit> itself, you
47+
can do this with "git format-patch -1 <commit>".
5248

5349
By default, each output file is numbered sequentially from 1, and uses the
5450
first line of the commit message (massaged for pathname safety) as
@@ -182,6 +178,13 @@ not add any suffix.
182178
applied. By default the contents of changes in those files are
183179
encoded in the patch.
184180

181+
--root::
182+
Treat the revision argument as a <revision range>, even if it
183+
is just a single commit (that would normally be treated as a
184+
<since>). Note that root commits included in the specified
185+
range are always formatted as creation patches, independently
186+
of this flag.
187+
185188
CONFIGURATION
186189
-------------
187190
You can specify extra mail header lines to be added to each message

0 commit comments

Comments
 (0)