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 -z::
14 \0 line termination on output
16 --name-only::
17 Show only names of changed files.
19 --name-status::
20 Show only names and status of changed files.
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.
27 --abbrev[=<n>]::
28 Instead of showing the full 40-byte hexadecimal object
29 name in diff-raw format output and diff-tree header
30 lines, show only handful hexdigits prefix. This is
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>.
35 -B::
36 Break complete rewrite changes into pairs of delete and create.
38 -M::
39 Detect renames.
41 -C::
42 Detect copies as well as renames.
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.
55 --find-copies-harder::
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
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.
63 -l<num>::
64 -M and -C options require O(n^2) processing time where n
65 is the number of potential rename/copy targets. This
66 option prevents rename/copy detection from running if
67 the number of rename/copy targets exceeds the specified
68 number.
70 -S<string>::
71 Look for differences that contain the change in <string>.
73 --pickaxe-all::
74 When -S finds a change, show all the changes in that
75 changeset, not just the files that contain the change
76 in <string>.
78 --pickaxe-regex::
79 Make the <string> not a plain string but an extended POSIX
80 regex to match.
82 -O<orderfile>::
83 Output the patch in the order specified in the
84 <orderfile>, which has one shell glob pattern per line.
86 -R::
87 Swap two inputs; that is, show differences from index or
88 on-disk file to tree contents.
90 For more detailed explanation on these common options, see also
91 link:diffcore.html[diffcore documentation].