]>
Commit | Line | Data |
---|---|---|
dda2d79a JH |
1 | -p:: |
2 | Generate patch (see section on generating patches) | |
3 | ||
4 | -u:: | |
5 | Synonym for "-p". | |
6 | ||
b5376648 JH |
7 | --raw:: |
8 | Generate the raw format. | |
9 | ||
5c91da25 | 10 | --patch-with-raw:: |
b5376648 | 11 | Synonym for "-p --raw". |
5c91da25 | 12 | |
d75f7952 | 13 | --stat:: |
b5376648 | 14 | Generate a diffstat. |
d75f7952 | 15 | |
4bbd261b SE |
16 | --summary:: |
17 | Output a condensed summary of extended header information | |
18 | such as creations, renames and mode changes. | |
19 | ||
29353273 | 20 | --patch-with-stat:: |
b5376648 | 21 | Synonym for "-p --stat". |
29353273 | 22 | |
dda2d79a JH |
23 | -z:: |
24 | \0 line termination on output | |
25 | ||
26 | --name-only:: | |
27 | Show only names of changed files. | |
28 | ||
946f5f7c JH |
29 | --name-status:: |
30 | Show only names and status of changed files. | |
dda2d79a | 31 | |
b5376648 JH |
32 | --color:: |
33 | Show colored diff. | |
34 | ||
35 | --no-color:: | |
36 | Turn off colored diff, even when the configuration file | |
37 | gives the default to color output. | |
38 | ||
39 | --no-renames:: | |
40 | Turn off rename detection, even when the configuration | |
41 | file gives the default to do so. | |
42 | ||
80b1e511 JH |
43 | --full-index:: |
44 | Instead of the first handful characters, show full | |
45 | object name of pre- and post-image blob on the "index" | |
b5376648 JH |
46 | line when generating a patch format output. |
47 | ||
48 | --binary:: | |
49 | In addition to --full-index, output "binary diff" that | |
50 | can be applied with "git apply". | |
80b1e511 | 51 | |
913419fc | 52 | --abbrev[=<n>]:: |
47dd0d59 JH |
53 | Instead of showing the full 40-byte hexadecimal object |
54 | name in diff-raw format output and diff-tree header | |
89438677 | 55 | lines, show only handful hexdigits prefix. This is |
913419fc JH |
56 | independent of --full-index option above, which controls |
57 | the diff-patch output format. Non default number of | |
58 | digits can be specified with --abbrev=<n>. | |
47dd0d59 | 59 | |
dda2d79a JH |
60 | -B:: |
61 | Break complete rewrite changes into pairs of delete and create. | |
62 | ||
63 | -M:: | |
64 | Detect renames. | |
65 | ||
66 | -C:: | |
67 | Detect copies as well as renames. | |
68 | ||
147cf317 JL |
69 | --diff-filter=[ACDMRTUXB*]:: |
70 | Select only files that are Added (`A`), Copied (`C`), | |
71 | Deleted (`D`), Modified (`M`), Renamed (`R`), have their | |
72 | type (mode) changed (`T`), are Unmerged (`U`), are | |
73 | Unknown (`X`), or have had their pairing Broken (`B`). | |
74 | Any combination of the filter characters may be used. | |
75 | When `*` (All-or-none) is added to the combination, all | |
76 | paths are selected if there is any file that matches | |
77 | other criteria in the comparison; if there is no file | |
78 | that matches other criteria, nothing is selected. | |
79 | ||
dda2d79a | 80 | --find-copies-harder:: |
f73ae1fc CM |
81 | For performance reasons, by default, -C option finds copies only |
82 | if the original file of the copy was modified in the same | |
83 | changeset. This flag makes the command | |
dda2d79a JH |
84 | inspect unmodified files as candidates for the source of |
85 | copy. This is a very expensive operation for large | |
86 | projects, so use it with caution. | |
87 | ||
8082d8d3 JH |
88 | -l<num>:: |
89 | -M and -C options require O(n^2) processing time where n | |
f73ae1fc | 90 | is the number of potential rename/copy targets. This |
8082d8d3 | 91 | option prevents rename/copy detection from running if |
f73ae1fc | 92 | the number of rename/copy targets exceeds the specified |
8082d8d3 JH |
93 | number. |
94 | ||
dda2d79a | 95 | -S<string>:: |
f73ae1fc | 96 | Look for differences that contain the change in <string>. |
dda2d79a JH |
97 | |
98 | --pickaxe-all:: | |
99 | When -S finds a change, show all the changes in that | |
f73ae1fc | 100 | changeset, not just the files that contain the change |
dda2d79a JH |
101 | in <string>. |
102 | ||
d01d8c67 PB |
103 | --pickaxe-regex:: |
104 | Make the <string> not a plain string but an extended POSIX | |
105 | regex to match. | |
106 | ||
dda2d79a JH |
107 | -O<orderfile>:: |
108 | Output the patch in the order specified in the | |
109 | <orderfile>, which has one shell glob pattern per line. | |
110 | ||
111 | -R:: | |
5f3aa197 | 112 | Swap two inputs; that is, show differences from index or |
dda2d79a JH |
113 | on-disk file to tree contents. |
114 | ||
d507bb15 SF |
115 | --text:: |
116 | Treat all files as text. | |
117 | ||
118 | -a:: | |
119 | Shorthand for "--text". | |
120 | ||
8db9307c JH |
121 | For more detailed explanation on these common options, see also |
122 | link:diffcore.html[diffcore documentation]. |