]>
Commit | Line | Data |
---|---|---|
da0005b8 | 1 | diff.autoRefreshIndex:: |
19299a84 RR |
2 | When using 'git diff' to compare with work tree |
3 | files, do not consider stat-only change as changed. | |
4 | Instead, silently run `git update-index --refresh` to | |
5 | update the cached stat information for paths whose | |
6 | contents in the work tree match the contents in the | |
7 | index. This option defaults to true. Note that this | |
8 | affects only 'git diff' Porcelain, and not lower level | |
9 | 'diff' commands such as 'git diff-files'. | |
10 | ||
2d174951 JH |
11 | diff.dirstat:: |
12 | A comma separated list of `--dirstat` parameters specifying the | |
13 | default behavior of the `--dirstat` option to linkgit:git-diff[1]` | |
14 | and friends. The defaults can be overridden on the command line | |
15 | (using `--dirstat=<param1,param2,...>`). The fallback defaults | |
16 | (when not changed by `diff.dirstat`) are `changes,noncumulative,3`. | |
17 | The following parameters are available: | |
18 | + | |
19 | -- | |
20 | `changes`;; | |
21 | Compute the dirstat numbers by counting the lines that have been | |
22 | removed from the source, or added to the destination. This ignores | |
23 | the amount of pure code movements within a file. In other words, | |
24 | rearranging lines in a file is not counted as much as other changes. | |
25 | This is the default behavior when no parameter is given. | |
1c57a627 JH |
26 | `lines`;; |
27 | Compute the dirstat numbers by doing the regular line-based diff | |
28 | analysis, and summing the removed/added line counts. (For binary | |
29 | files, count 64-byte chunks instead, since binary files have no | |
30 | natural concept of lines). This is a more expensive `--dirstat` | |
31 | behavior than the `changes` behavior, but it does count rearranged | |
32 | lines within a file as much as other changes. The resulting output | |
33 | is consistent with what you get from the other `--*stat` options. | |
2d174951 JH |
34 | `files`;; |
35 | Compute the dirstat numbers by counting the number of files changed. | |
36 | Each changed file counts equally in the dirstat analysis. This is | |
37 | the computationally cheapest `--dirstat` behavior, since it does | |
38 | not have to look at the file contents at all. | |
39 | `cumulative`;; | |
40 | Count changes in a child directory for the parent directory as well. | |
41 | Note that when using `cumulative`, the sum of the percentages | |
42 | reported may exceed 100%. The default (non-cumulative) behavior can | |
43 | be specified with the `noncumulative` parameter. | |
44 | <limit>;; | |
45 | An integer parameter specifies a cut-off percent (3% by default). | |
46 | Directories contributing less than this percentage of the changes | |
47 | are not shown in the output. | |
48 | -- | |
49 | + | |
50 | Example: The following will count changed files, while ignoring | |
51 | directories with less than 10% of the total amount of changed files, | |
52 | and accumulating child directory counts in the parent directories: | |
53 | `files,10,cumulative`. | |
54 | ||
df44483a ZJS |
55 | diff.statGraphWidth:: |
56 | Limit the width of the graph part in --stat output. If set, applies | |
b4ab1980 | 57 | to all commands generating --stat output except format-patch. |
df44483a | 58 | |
6468a4e5 | 59 | diff.context:: |
00704e4b JH |
60 | Generate diffs with <n> lines of context instead of the default |
61 | of 3. This value is overridden by the -U option. | |
6468a4e5 | 62 | |
c4888677 VN |
63 | diff.interHunkContext:: |
64 | Show the context between diff hunks, up to the specified number | |
65 | of lines, thereby fusing the hunks that are close to each other. | |
66 | This value serves as the default for the `--inter-hunk-context` | |
67 | command line option. | |
68 | ||
19299a84 RR |
69 | diff.external:: |
70 | If this config variable is set, diff generation is not | |
71 | performed using the internal diff machinery, but using the | |
72 | given command. Can be overridden with the `GIT_EXTERNAL_DIFF' | |
73 | environment variable. The command is called with parameters | |
74 | as described under "git Diffs" in linkgit:git[1]. Note: if | |
75 | you want to use an external diff program only on a subset of | |
76 | your files, you might want to use linkgit:gitattributes[5] instead. | |
77 | ||
78 | diff.ignoreSubmodules:: | |
79 | Sets the default value of --ignore-submodules. Note that this | |
80 | affects only 'git diff' Porcelain, and not lower level 'diff' | |
81 | commands such as 'git diff-files'. 'git checkout' also honors | |
bb58b696 JL |
82 | this setting when reporting uncommitted changes. Setting it to |
83 | 'all' disables the submodule summary normally shown by 'git commit' | |
ae9f6311 | 84 | and 'git status' when `status.submoduleSummary` is set unless it is |
06ab60c0 | 85 | overridden by using the --ignore-submodules command-line option. |
bb58b696 | 86 | The 'git submodule' commands are not affected by this setting. |
19299a84 | 87 | |
da0005b8 | 88 | diff.mnemonicPrefix:: |
19299a84 RR |
89 | If set, 'git diff' uses a prefix pair that is different from the |
90 | standard "a/" and "b/" depending on what is being compared. When | |
91 | this configuration is in effect, reverse diff output also swaps | |
92 | the order of the prefixes: | |
93 | `git diff`;; | |
94 | compares the (i)ndex and the (w)ork tree; | |
95 | `git diff HEAD`;; | |
96 | compares a (c)ommit and the (w)ork tree; | |
97 | `git diff --cached`;; | |
98 | compares a (c)ommit and the (i)ndex; | |
99 | `git diff HEAD:file1 file2`;; | |
100 | compares an (o)bject and a (w)ork tree entity; | |
101 | `git diff --no-index a b`;; | |
102 | compares two non-git things (1) and (2). | |
103 | ||
104 | diff.noprefix:: | |
105 | If set, 'git diff' does not show any source or destination prefix. | |
106 | ||
da0005b8 | 107 | diff.orderFile:: |
874444b7 RH |
108 | File indicating how to order files within a diff. |
109 | See the '-O' option to linkgit:git-diff[1] for details. | |
1a5fccc0 RH |
110 | If `diff.orderFile` is a relative pathname, it is treated as |
111 | relative to the top of the working tree. | |
6d8940b5 | 112 | |
19299a84 RR |
113 | diff.renameLimit:: |
114 | The number of files to consider when performing the copy/rename | |
23f8239b | 115 | detection; equivalent to the 'git diff' option `-l`. |
19299a84 RR |
116 | |
117 | diff.renames:: | |
62df1e68 MM |
118 | Whether and how Git detects renames. If set to "false", |
119 | rename detection is disabled. If set to "true", basic rename | |
120 | detection is enabled. If set to "copies" or "copy", Git will | |
5404c116 | 121 | detect copies, as well. Defaults to true. Note that this |
62df1e68 MM |
122 | affects only 'git diff' Porcelain like linkgit:git-diff[1] and |
123 | linkgit:git-log[1], and not lower level commands such as | |
124 | linkgit:git-diff-files[1]. | |
19299a84 RR |
125 | |
126 | diff.suppressBlankEmpty:: | |
127 | A boolean to inhibit the standard behavior of printing a space | |
128 | before each empty output line. Defaults to false. | |
129 | ||
c47ef57c RR |
130 | diff.submodule:: |
131 | Specify the format in which differences in submodules are | |
fd47ae6a JK |
132 | shown. The "short" format just shows the names of the commits |
133 | at the beginning and end of the range. The "log" format lists | |
134 | the commits in the range like linkgit:git-submodule[1] `summary` | |
135 | does. The "diff" format shows an inline diff of the changed | |
136 | contents of the submodule. Defaults to "short". | |
c47ef57c | 137 | |
22bc70fd RR |
138 | diff.wordRegex:: |
139 | A POSIX Extended Regular Expression used to determine what is a "word" | |
140 | when performing word-by-word difference calculations. Character | |
141 | sequences that match the regular expression are "words", all other | |
142 | characters are *ignorable* whitespace. | |
143 | ||
90b94c26 RR |
144 | diff.<driver>.command:: |
145 | The custom diff driver command. See linkgit:gitattributes[5] | |
146 | for details. | |
147 | ||
148 | diff.<driver>.xfuncname:: | |
149 | The regular expression that the diff driver should use to | |
150 | recognize the hunk header. A built-in pattern may also be used. | |
151 | See linkgit:gitattributes[5] for details. | |
152 | ||
153 | diff.<driver>.binary:: | |
154 | Set this option to true to make the diff driver treat files as | |
155 | binary. See linkgit:gitattributes[5] for details. | |
156 | ||
157 | diff.<driver>.textconv:: | |
158 | The command that the diff driver should call to generate the | |
159 | text-converted version of a file. The result of the | |
160 | conversion is used to generate a human-readable diff. See | |
161 | linkgit:gitattributes[5] for details. | |
162 | ||
da0005b8 | 163 | diff.<driver>.wordRegex:: |
90b94c26 RR |
164 | The regular expression that the diff driver should use to |
165 | split words in a line. See linkgit:gitattributes[5] for | |
166 | details. | |
167 | ||
168 | diff.<driver>.cachetextconv:: | |
169 | Set this option to true to make the diff driver cache the text | |
170 | conversion outputs. See linkgit:gitattributes[5] for details. | |
48672b3d RR |
171 | |
172 | diff.tool:: | |
f35ec546 DA |
173 | Controls which diff tool is used by linkgit:git-difftool[1]. |
174 | This variable overrides the value configured in `merge.tool`. | |
175 | The list below shows the valid built-in values. | |
176 | Any other value is treated as a custom diff tool and requires | |
177 | that a corresponding difftool.<tool>.cmd variable is defined. | |
178 | ||
179 | include::mergetools-diff.txt[] | |
07ab4dec | 180 | |
433860f3 | 181 | diff.indentHeuristic:: |
3cde4e02 JH |
182 | Set this option to `true` to enable experimental heuristics |
183 | that shift diff hunk boundaries to make patches easier to read. | |
5580b271 | 184 | |
07ab4dec MP |
185 | diff.algorithm:: |
186 | Choose a diff algorithm. The variants are as follows: | |
187 | + | |
188 | -- | |
189 | `default`, `myers`;; | |
190 | The basic greedy diff algorithm. Currently, this is the default. | |
191 | `minimal`;; | |
192 | Spend extra time to make sure the smallest possible diff is | |
193 | produced. | |
194 | `patience`;; | |
195 | Use "patience diff" algorithm when generating patches. | |
196 | `histogram`;; | |
197 | This algorithm extends the patience algorithm to "support | |
198 | low-occurrence common elements". | |
199 | -- | |
200 | + | |
a17505f2 JH |
201 | |
202 | diff.wsErrorHighlight:: | |
203 | A comma separated list of `old`, `new`, `context`, that | |
204 | specifies how whitespace errors on lines are highlighted | |
205 | with `color.diff.whitespace`. Can be overridden by the | |
206 | command line option `--ws-error-highlight=<kind>` |