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