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