338014c8162c1576796a57ab61498612948fe9dc
[git.git] / Documentation / diff-options.txt
1 -p::
2         Generate patch (see section on generating patches)
3
4 -u::
5         Synonym for "-p".
6
7 --patch-with-raw::
8         Generate patch but keep also the default raw diff output.
9
10 -z::
11         \0 line termination on output
12
13 --name-only::
14         Show only names of changed files.
15
16 --name-status::
17         Show only names and status of changed files.
18
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
24 --abbrev[=<n>]::
25         Instead of showing the full 40-byte hexadecimal object
26         name in diff-raw format output and diff-tree header
27         lines, show only handful hexdigits prefix.  This is
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>.
31
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
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
52 --find-copies-harder::
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
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
60 -l<num>::
61         -M and -C options require O(n^2) processing time where n
62         is the number of potential rename/copy targets.  This
63         option prevents rename/copy detection from running if
64         the number of rename/copy targets exceeds the specified
65         number.
66
67 -S<string>::
68         Look for differences that contain the change in <string>.
69
70 --pickaxe-all::
71         When -S finds a change, show all the changes in that
72         changeset, not just the files that contain the change
73         in <string>.
74
75 --pickaxe-regex::
76         Make the <string> not a plain string but an extended POSIX
77         regex to match.
78
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::
84         Swap two inputs; that is, show differences from index or
85         on-disk file to tree contents.
86
87 For more detailed explanation on these common options, see also
88 link:diffcore.html[diffcore documentation].