blob: ac770502553d9b4d3d1176f63ad01791736602a8 [file] [log] [blame]
Junio C Hamano209ebe82011-04-27 21:09:591diff.autorefreshindex::
2When using 'git diff' to compare with work tree
3files, do not consider stat-only change as changed.
4Instead, silently run `git update-index --refresh` to
5update the cached stat information for paths whose
6contents in the work tree match the contents in the
7index. This option defaults to true. Note that this
8affects only 'git diff' Porcelain, and not lower level
9'diff' commands such as 'git diff-files'.
10
Junio C Hamano1c222c52011-05-13 19:55:3211diff.dirstat::
12A comma separated list of `--dirstat` parameters specifying the
13default behavior of the `--dirstat` option to linkgit:git-diff[1]`
14and 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`.
17The following parameters are available:
18+
19--
20`changes`;;
21Compute the dirstat numbers by counting the lines that have been
22removed from the source, or added to the destination. This ignores
23the amount of pure code movements within a file. In other words,
24rearranging lines in a file is not counted as much as other changes.
25This is the default behavior when no parameter is given.
26`lines`;;
27Compute the dirstat numbers by doing the regular line-based diff
28analysis, and summing the removed/added line counts. (For binary
29files, count 64-byte chunks instead, since binary files have no
30natural concept of lines). This is a more expensive `--dirstat`
31behavior than the `changes` behavior, but it does count rearranged
32lines within a file as much as other changes. The resulting output
33is consistent with what you get from the other `--*stat` options.
34`files`;;
35Compute the dirstat numbers by counting the number of files changed.
36Each changed file counts equally in the dirstat analysis. This is
37the computationally cheapest `--dirstat` behavior, since it does
38not have to look at the file contents at all.
39`cumulative`;;
40Count changes in a child directory for the parent directory as well.
41Note that when using `cumulative`, the sum of the percentages
42reported may exceed 100%. The default (non-cumulative) behavior can
43be specified with the `noncumulative` parameter.
44<limit>;;
45An integer parameter specifies a cut-off percent (3% by default).
46Directories contributing less than this percentage of the changes
47are not shown in the output.
48--
49+
50Example: The following will count changed files, while ignoring
51directories with less than 10% of the total amount of changed files,
52and accumulating child directory counts in the parent directories:
53`files,10,cumulative`.
54
Junio C Hamanoaea9e6b2012-03-07 00:17:1155diff.statGraphWidth::
56Limit the width of the graph part in --stat output. If set, applies
Junio C Hamano010705a2012-06-19 23:37:2657to all commands generating --stat output except format-patch.
Junio C Hamanoaea9e6b2012-03-07 00:17:1158
Junio C Hamanoa1295452012-11-13 22:32:0459diff.context::
Junio C Hamano0766abc2012-12-08 00:08:5660Generate diffs with <n> lines of context instead of the default
61of 3. This value is overridden by the -U option.
Junio C Hamanoa1295452012-11-13 22:32:0462
Junio C Hamano209ebe82011-04-27 21:09:5963diff.external::
64If this config variable is set, diff generation is not
65performed using the internal diff machinery, but using the
66given command. Can be overridden with the `GIT_EXTERNAL_DIFF'
67environment variable. The command is called with parameters
68as described under "git Diffs" in linkgit:git[1]. Note: if
69you want to use an external diff program only on a subset of
70your files, you might want to use linkgit:gitattributes[5] instead.
71
72diff.ignoreSubmodules::
73Sets the default value of --ignore-submodules. Note that this
74affects only 'git diff' Porcelain, and not lower level 'diff'
75commands such as 'git diff-files'. 'git checkout' also honors
76this setting when reporting uncommitted changes.
77
78diff.mnemonicprefix::
79If set, 'git diff' uses a prefix pair that is different from the
80standard "a/" and "b/" depending on what is being compared. When
81this configuration is in effect, reverse diff output also swaps
82the order of the prefixes:
83`git diff`;;
84compares the (i)ndex and the (w)ork tree;
85`git diff HEAD`;;
86 compares a (c)ommit and the (w)ork tree;
87`git diff --cached`;;
88compares a (c)ommit and the (i)ndex;
89`git diff HEAD:file1 file2`;;
90compares an (o)bject and a (w)ork tree entity;
91`git diff --no-index a b`;;
92compares two non-git things (1) and (2).
93
94diff.noprefix::
95If set, 'git diff' does not show any source or destination prefix.
96
97diff.renameLimit::
98The number of files to consider when performing the copy/rename
99detection; equivalent to the 'git diff' option '-l'.
100
101diff.renames::
Junio C Hamano076ffcc2013-02-06 05:13:21102Tells Git to detect renames. If set to any boolean value, it
Junio C Hamano209ebe82011-04-27 21:09:59103will enable basic rename detection. If set to "copies" or
104"copy", it will detect copies, as well.
105
106diff.suppressBlankEmpty::
107A boolean to inhibit the standard behavior of printing a space
108before each empty output line. Defaults to false.
109
Junio C Hamanob4e58b12012-11-26 03:13:06110diff.submodule::
111Specify the format in which differences in submodules are
112shown. The "log" format lists the commits in the range like
113linkgit:git-submodule[1] `summary` does. The "short" format
114format just shows the names of the commits at the beginning
115and end of the range. Defaults to short.
116
117diff.wordRegex::
118A POSIX Extended Regular Expression used to determine what is a "word"
119when performing word-by-word difference calculations. Character
120sequences that match the regular expression are "words", all other
121characters are *ignorable* whitespace.
122
Junio C Hamano209ebe82011-04-27 21:09:59123diff.<driver>.command::
124The custom diff driver command. See linkgit:gitattributes[5]
125for details.
126
127diff.<driver>.xfuncname::
128The regular expression that the diff driver should use to
129recognize the hunk header. A built-in pattern may also be used.
130See linkgit:gitattributes[5] for details.
131
132diff.<driver>.binary::
133Set this option to true to make the diff driver treat files as
134binary. See linkgit:gitattributes[5] for details.
135
136diff.<driver>.textconv::
137The command that the diff driver should call to generate the
138text-converted version of a file. The result of the
139conversion is used to generate a human-readable diff. See
140linkgit:gitattributes[5] for details.
141
142diff.<driver>.wordregex::
143The regular expression that the diff driver should use to
144split words in a line. See linkgit:gitattributes[5] for
145details.
146
147diff.<driver>.cachetextconv::
148Set this option to true to make the diff driver cache the text
149conversion outputs. See linkgit:gitattributes[5] for details.
150
151diff.tool::
Junio C Hamanob5e079f2013-02-08 00:02:52152Controls which diff tool is used by linkgit:git-difftool[1].
153This variable overrides the value configured in `merge.tool`.
154The list below shows the valid built-in values.
155Any other value is treated as a custom diff tool and requires
156that a corresponding difftool.<tool>.cmd variable is defined.
157
158include::mergetools-diff.txt[]
Junio C Hamano80ad00d2013-02-18 00:19:03159
160diff.algorithm::
161Choose a diff algorithm. The variants are as follows:
162+
163--
164`default`, `myers`;;
165The basic greedy diff algorithm. Currently, this is the default.
166`minimal`;;
167Spend extra time to make sure the smallest possible diff is
168produced.
169`patience`;;
170Use "patience diff" algorithm when generating patches.
171`histogram`;;
172This algorithm extends the patience algorithm to "support
173low-occurrence common elements".
174--
175+