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