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