1-p::
2Generate patch (see section on generating patches)
34
-u::
5Synonym for "-p".
67
--patch-with-raw::
8Generate patch but keep also the default raw diff output.
910
-z::
11\0 line termination on output
1213
--name-only::
14Show only names of changed files.
1516
--name-status::
17Show only names and status of changed files.
1819
--full-index::
20Instead of the first handful characters, show full
21object name of pre- and post-image blob on the "index"
22line when generating a patch format output.
2324
--abbrev[=<n>]::
25Instead of showing the full 40-byte hexadecimal object
26name in diff-raw format output and diff-tree header
27lines, show only handful hexdigits prefix. This is
28independent of --full-index option above, which controls
29the diff-patch output format. Non default number of
30digits can be specified with --abbrev=<n>.
3132
-B::
33Break complete rewrite changes into pairs of delete and create.
3435
-M::
36Detect renames.
3738
-C::
39Detect copies as well as renames.
4041
--diff-filter=[ACDMRTUXB*]::
42Select only files that are Added (`A`), Copied (`C`),
43Deleted (`D`), Modified (`M`), Renamed (`R`), have their
44type (mode) changed (`T`), are Unmerged (`U`), are
45Unknown (`X`), or have had their pairing Broken (`B`).
46Any combination of the filter characters may be used.
47When `*` (All-or-none) is added to the combination, all
48paths are selected if there is any file that matches
49other criteria in the comparison; if there is no file
50that matches other criteria, nothing is selected.
5152
--find-copies-harder::
53For performance reasons, by default, -C option finds copies only
54if the original file of the copy was modified in the same
55changeset. This flag makes the command
56inspect unmodified files as candidates for the source of
57copy. This is a very expensive operation for large
58projects, so use it with caution.
5960
-l<num>::
61-M and -C options require O(n^2) processing time where n
62is the number of potential rename/copy targets. This
63option prevents rename/copy detection from running if
64the number of rename/copy targets exceeds the specified
65number.
6667
-S<string>::
68Look for differences that contain the change in <string>.
6970
--pickaxe-all::
71When -S finds a change, show all the changes in that
72changeset, not just the files that contain the change
73in <string>.
7475
--pickaxe-regex::
76Make the <string> not a plain string but an extended POSIX
77regex to match.
7879
-O<orderfile>::
80Output the patch in the order specified in the
81<orderfile>, which has one shell glob pattern per line.
8283
-R::
84Swap two inputs; that is, show differences from index or
85on-disk file to tree contents.
8687
For more detailed explanation on these common options, see also
88link:diffcore.html[diffcore documentation].