Update documentation for git-format-patch
[jc: adjusted for recently resurrected features] Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Dennis Stosberg committed
May 31, 2006 at 16:14 UTC
2052d146f60eaeeef50cb4d437e4a25051f8d8c3
1 file changed
+35
-34
Documentation/git-format-patch.txt
+35
-34
@@ -9,37 +9,46 @@ git-format-patch - Prepare patches for e-mail submission
9
SYNOPSIS
10
--------
11
[verse]
12
-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [-s] [-c]
13
- [--diff-options] <his> [<mine>]
12
+'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach]
13
+ [-s | --signoff] [--diff-options] [--start-number <n>]
14
+ <since>[..<until>]
15
16
DESCRIPTION
17
-----------
17
-Prepare each commit with its patch since <mine> head forked from
18
-<his> head, one file per patch formatted to resemble UNIX mailbox
19
-format, for e-mail submission or use with gitlink:git-am[1].
18
+
19
+Prepare each commit between <since> and <until> with its patch in
20
+one file per commit, formatted to resemble UNIX mailbox format.
21
+If ..<until> is not specified, the head of the current working
22
+tree is implied.
23
+
24
+The output of this command is convenient for e-mail submission or
25
+for use with gitlink:git-am[1].
26
27
Each output file is numbered sequentially from 1, and uses the
22
-first line of the commit message (massaged for pathname safety)
23
-as the filename.
28
+first line of the commit message (massaged for pathname safety) as
29
+the filename. The names of the output files are printed to standard
30
+output, unless the --stdout option is specified.
31
25
-When -o is specified, output files are created in <dir>; otherwise
26
-they are created in the current working directory. This option
27
-is ignored if --stdout is specified.
32
+If -o is specified, output files are created in <dir>. Otherwise
33
+they are created in the current working directory.
34
29
-When -n is specified, instead of "[PATCH] Subject", the first
30
-line is formatted as "[PATCH N/M] Subject", unless you have only
31
-one patch.
35
+If -n is specified, instead of "[PATCH] Subject", the first line
36
+is formatted as "[PATCH n/m] Subject".
37
38
39
OPTIONS
40
-------
41
-o|--output-directory <dir>::
42
Use <dir> to store the resulting files, instead of the
38
- current working directory.
43
+ current working directory. This option is ignored if
44
+ --stdout is specified.
45
46
-n|--numbered::
47
Name output in '[PATCH n/m]' format.
48
49
+--start-number <n>::
50
+ Start numbering the patches at <n> instead of 1.
51
+
52
-k|--keep-subject::
53
Do not strip/add '[PATCH]' from the first line of the
54
commit log message.
@@ -48,17 +57,9 @@ OPTIONS
57
Add `Signed-off-by:` line to the commit message, using
58
the committer identity of yourself.
59
51
--c|--check::
52
- Display suspicious lines in the patch. The definition
53
- of 'suspicious lines' is currently the lines that has
54
- trailing whitespaces, and the lines whose indentation
55
- has a SP character immediately followed by a TAB
56
- character.
57
-
60
--stdout::
59
- This flag generates the mbox formatted output to the
60
- standard output, instead of saving them into a file per
61
- patch and implies --mbox.
61
+ Print all commits to the standard output in mbox format,
62
+ instead of creating a file for each one.
63
64
--attach::
65
Create attachments instead of inlining patches.
@@ -82,18 +83,18 @@ git-format-patch -k --stdout R1..R2 | git-am -3 -k::
83
cherry-pick them.
84
85
git-format-patch origin::
85
- Extract commits the current branch accumulated since it
86
- pulled from origin the last time in a patch form for
87
- e-mail submission.
86
+ Extract all commits which are in the current branch but
87
+ not in the origin branch. For each commit a separate file
88
+ is created in the current directory.
89
90
git-format-patch -M -B origin::
90
- The same as the previous one, except detect and handle
91
- renames and complete rewrites intelligently to produce
92
- renaming patch. A renaming patch reduces the amount of
93
- text output, and generally makes it easier to review
94
- it. Note that the "patch" program does not understand
95
- renaming patch well, so use it only when you know the
96
- recipient uses git to apply your patch.
91
+ The same as the previous one. Additionally, it detects
92
+ and handles renames and complete rewrites intelligently to
93
+ produce a renaming patch. A renaming patch reduces the
94
+ amount of text output, and generally makes it easier to
95
+ review it. Note that the "patch" program does not
96
+ understand renaming patches, so use it only when you know
97
+ the recipient uses git to apply your patch.
98
99
100
See Also