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