Nguyễn Thái Ngọc Duy | da0005b | 2015-03-11 16:32:45 -0400 | [diff] [blame] | 1 | diff.autoRefreshIndex:: |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 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 | |
Johan Herland | 2d17495 | 2011-04-29 11:36:19 +0200 | [diff] [blame] | 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. |
Johan Herland | 1c57a62 | 2011-04-29 11:36:21 +0200 | [diff] [blame] | 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. |
Johan Herland | 2d17495 | 2011-04-29 11:36:19 +0200 | [diff] [blame] | 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 | |
Zbigniew Jędrzejewski-Szmek | df44483 | 2012-03-01 13:26:46 +0100 | [diff] [blame] | 55 | diff.statGraphWidth:: |
| 56 | Limit the width of the graph part in --stat output. If set, applies |
Miklos Vajna | b4ab198 | 2012-06-19 19:56:09 +0200 | [diff] [blame] | 57 | to all commands generating --stat output except format-patch. |
Zbigniew Jędrzejewski-Szmek | df44483 | 2012-03-01 13:26:46 +0100 | [diff] [blame] | 58 | |
Jeff Muizelaar | 6468a4e | 2012-09-27 15:12:52 -0400 | [diff] [blame] | 59 | diff.context:: |
Junio C Hamano | 00704e4 | 2012-12-07 15:15:59 -0800 | [diff] [blame] | 60 | Generate diffs with <n> lines of context instead of the default |
| 61 | of 3. This value is overridden by the -U option. |
Jeff Muizelaar | 6468a4e | 2012-09-27 15:12:52 -0400 | [diff] [blame] | 62 | |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 63 | diff.external:: |
| 64 | If this config variable is set, diff generation is not |
| 65 | performed using the internal diff machinery, but using the |
| 66 | given command. Can be overridden with the `GIT_EXTERNAL_DIFF' |
| 67 | environment variable. The command is called with parameters |
| 68 | as described under "git Diffs" in linkgit:git[1]. Note: if |
| 69 | you want to use an external diff program only on a subset of |
| 70 | your files, you might want to use linkgit:gitattributes[5] instead. |
| 71 | |
| 72 | diff.ignoreSubmodules:: |
| 73 | Sets the default value of --ignore-submodules. Note that this |
| 74 | affects only 'git diff' Porcelain, and not lower level 'diff' |
| 75 | commands such as 'git diff-files'. 'git checkout' also honors |
Jens Lehmann | bb58b69 | 2013-09-11 21:07:15 +0200 | [diff] [blame] | 76 | this setting when reporting uncommitted changes. Setting it to |
| 77 | 'all' disables the submodule summary normally shown by 'git commit' |
Nguyễn Thái Ngọc Duy | da0005b | 2015-03-11 16:32:45 -0400 | [diff] [blame] | 78 | and 'git status' when 'status.submoduleSummary' is set unless it is |
Jason St. John | 06ab60c | 2014-05-21 14:52:26 -0400 | [diff] [blame] | 79 | overridden by using the --ignore-submodules command-line option. |
Jens Lehmann | bb58b69 | 2013-09-11 21:07:15 +0200 | [diff] [blame] | 80 | The 'git submodule' commands are not affected by this setting. |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 81 | |
Nguyễn Thái Ngọc Duy | da0005b | 2015-03-11 16:32:45 -0400 | [diff] [blame] | 82 | diff.mnemonicPrefix:: |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 83 | If set, 'git diff' uses a prefix pair that is different from the |
| 84 | standard "a/" and "b/" depending on what is being compared. When |
| 85 | this configuration is in effect, reverse diff output also swaps |
| 86 | the order of the prefixes: |
| 87 | `git diff`;; |
| 88 | compares the (i)ndex and the (w)ork tree; |
| 89 | `git diff HEAD`;; |
| 90 | compares a (c)ommit and the (w)ork tree; |
| 91 | `git diff --cached`;; |
| 92 | compares a (c)ommit and the (i)ndex; |
| 93 | `git diff HEAD:file1 file2`;; |
| 94 | compares an (o)bject and a (w)ork tree entity; |
| 95 | `git diff --no-index a b`;; |
| 96 | compares two non-git things (1) and (2). |
| 97 | |
| 98 | diff.noprefix:: |
| 99 | If set, 'git diff' does not show any source or destination prefix. |
| 100 | |
Nguyễn Thái Ngọc Duy | da0005b | 2015-03-11 16:32:45 -0400 | [diff] [blame] | 101 | diff.orderFile:: |
Samuel Bronson | 6d8940b | 2013-12-18 19:08:12 -0500 | [diff] [blame] | 102 | File indicating how to order files within a diff, using |
| 103 | one shell glob pattern per line. |
| 104 | Can be overridden by the '-O' option to linkgit:git-diff[1]. |
| 105 | |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 106 | diff.renameLimit:: |
| 107 | The number of files to consider when performing the copy/rename |
| 108 | detection; equivalent to the 'git diff' option '-l'. |
| 109 | |
| 110 | diff.renames:: |
Matthieu Moy | 62df1e6 | 2016-02-25 09:59:17 +0100 | [diff] [blame] | 111 | Whether and how Git detects renames. If set to "false", |
| 112 | rename detection is disabled. If set to "true", basic rename |
| 113 | detection is enabled. If set to "copies" or "copy", Git will |
Matthieu Moy | 5404c11 | 2016-02-25 09:59:21 +0100 | [diff] [blame] | 114 | detect copies, as well. Defaults to true. Note that this |
Matthieu Moy | 62df1e6 | 2016-02-25 09:59:17 +0100 | [diff] [blame] | 115 | affects only 'git diff' Porcelain like linkgit:git-diff[1] and |
| 116 | linkgit:git-log[1], and not lower level commands such as |
| 117 | linkgit:git-diff-files[1]. |
Ramkumar Ramachandra | 19299a8 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 118 | |
| 119 | diff.suppressBlankEmpty:: |
| 120 | A boolean to inhibit the standard behavior of printing a space |
| 121 | before each empty output line. Defaults to false. |
| 122 | |
Ramkumar Ramachandra | c47ef57 | 2012-11-13 21:12:45 +0530 | [diff] [blame] | 123 | diff.submodule:: |
| 124 | Specify the format in which differences in submodules are |
| 125 | shown. The "log" format lists the commits in the range like |
| 126 | linkgit:git-submodule[1] `summary` does. The "short" format |
| 127 | format just shows the names of the commits at the beginning |
| 128 | and end of the range. Defaults to short. |
| 129 | |
Ramkumar Ramachandra | 22bc70f | 2012-11-13 21:12:44 +0530 | [diff] [blame] | 130 | diff.wordRegex:: |
| 131 | A POSIX Extended Regular Expression used to determine what is a "word" |
| 132 | when performing word-by-word difference calculations. Character |
| 133 | sequences that match the regular expression are "words", all other |
| 134 | characters are *ignorable* whitespace. |
| 135 | |
Ramkumar Ramachandra | 90b94c2 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 136 | diff.<driver>.command:: |
| 137 | The custom diff driver command. See linkgit:gitattributes[5] |
| 138 | for details. |
| 139 | |
| 140 | diff.<driver>.xfuncname:: |
| 141 | The regular expression that the diff driver should use to |
| 142 | recognize the hunk header. A built-in pattern may also be used. |
| 143 | See linkgit:gitattributes[5] for details. |
| 144 | |
| 145 | diff.<driver>.binary:: |
| 146 | Set this option to true to make the diff driver treat files as |
| 147 | binary. See linkgit:gitattributes[5] for details. |
| 148 | |
| 149 | diff.<driver>.textconv:: |
| 150 | The command that the diff driver should call to generate the |
| 151 | text-converted version of a file. The result of the |
| 152 | conversion is used to generate a human-readable diff. See |
| 153 | linkgit:gitattributes[5] for details. |
| 154 | |
Nguyễn Thái Ngọc Duy | da0005b | 2015-03-11 16:32:45 -0400 | [diff] [blame] | 155 | diff.<driver>.wordRegex:: |
Ramkumar Ramachandra | 90b94c2 | 2011-04-07 00:16:49 +0530 | [diff] [blame] | 156 | The regular expression that the diff driver should use to |
| 157 | split words in a line. See linkgit:gitattributes[5] for |
| 158 | details. |
| 159 | |
| 160 | diff.<driver>.cachetextconv:: |
| 161 | Set this option to true to make the diff driver cache the text |
| 162 | conversion outputs. See linkgit:gitattributes[5] for details. |
Ramkumar Ramachandra | 48672b3 | 2011-04-07 00:16:50 +0530 | [diff] [blame] | 163 | |
| 164 | diff.tool:: |
David Aguilar | f35ec54 | 2013-01-27 16:52:26 -0800 | [diff] [blame] | 165 | Controls which diff tool is used by linkgit:git-difftool[1]. |
| 166 | This variable overrides the value configured in `merge.tool`. |
| 167 | The list below shows the valid built-in values. |
| 168 | Any other value is treated as a custom diff tool and requires |
| 169 | that a corresponding difftool.<tool>.cmd variable is defined. |
| 170 | |
| 171 | include::mergetools-diff.txt[] |
Michal Privoznik | 07ab4de | 2013-01-16 08:51:57 +0100 | [diff] [blame] | 172 | |
Junio C Hamano | 5580b27 | 2016-06-10 10:58:55 -0700 | [diff] [blame] | 173 | diff.compactionHeuristic:: |
| 174 | Set this option to `true` to enable an experimental heuristic that |
| 175 | shifts the hunk boundary in an attempt to make the resulting |
| 176 | patch easier to read. |
| 177 | |
Michal Privoznik | 07ab4de | 2013-01-16 08:51:57 +0100 | [diff] [blame] | 178 | diff.algorithm:: |
| 179 | Choose a diff algorithm. The variants are as follows: |
| 180 | + |
| 181 | -- |
| 182 | `default`, `myers`;; |
| 183 | The basic greedy diff algorithm. Currently, this is the default. |
| 184 | `minimal`;; |
| 185 | Spend extra time to make sure the smallest possible diff is |
| 186 | produced. |
| 187 | `patience`;; |
| 188 | Use "patience diff" algorithm when generating patches. |
| 189 | `histogram`;; |
| 190 | This algorithm extends the patience algorithm to "support |
| 191 | low-occurrence common elements". |
| 192 | -- |
| 193 | + |