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