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