mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
Documentation: format-patch --root clarifications
Users were confused about the meaning and use of the --root option.
Notably, since 68c2ec7
(format-patch: show patch text for the root
commit, 2009-01-10), --root has nothing to do with showing the patch
text for the root commit any more.
Shorten and clarify the corresponding paragraph in the DESCRIPTION
section, document --root under OPTIONS, and add an explicit note that
root commits are formatted regardless.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5d83f9c198
commit
2d266f9d62
|
@ -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
|
REVISIONS" section in linkgit:git-rev-parse[1]) means the
|
||||||
commits in the specified range.
|
commits in the specified range.
|
||||||
|
|
||||||
A single commit, when interpreted as a <revision range>
|
The first rule takes precedence in the case of a single <commit>. To
|
||||||
expression, means "everything that leads to that commit", but
|
apply the second rule, i.e., format everything since the beginning of
|
||||||
if you write 'git format-patch <commit>', the previous rule
|
history up until <commit>, use the '\--root' option: "git format-patch
|
||||||
applies to that command line and you do not get "everything
|
\--root <commit>". If you want to format only <commit> itself, you
|
||||||
since the beginning of the time". If you want to format
|
can do this with "git format-patch -1 <commit>".
|
||||||
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>".
|
|
||||||
|
|
||||||
By default, 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
|
first line of the commit message (massaged for pathname safety) as
|
||||||
|
@ -170,6 +166,13 @@ not add any suffix.
|
||||||
applied. By default the contents of changes in those files are
|
applied. By default the contents of changes in those files are
|
||||||
encoded in the patch.
|
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
|
CONFIGURATION
|
||||||
-------------
|
-------------
|
||||||
You can specify extra mail header lines to be added to each message
|
You can specify extra mail header lines to be added to each message
|
||||||
|
|
Loading…
Reference in a new issue