config.txt,diff-options.txt: porcelain vs. plumbing for color.diff
Reading the diff-family and config man pages one may think that the color.diff and color.ui settings apply to all diff commands. Make it clearer that they do not apply to the plumbing variants diff-{files,index,tree}. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
ec014eac0e
commit
6999c54029
|
@ -708,9 +708,16 @@ second is the background. The position of the attribute, if any,
|
||||||
doesn't matter.
|
doesn't matter.
|
||||||
|
|
||||||
color.diff::
|
color.diff::
|
||||||
When set to `always`, always use colors in patch.
|
Whether to use ANSI escape sequences to add color to patches.
|
||||||
When false (or `never`), never. When set to `true` or `auto`, use
|
If this is set to `always`, linkgit:git-diff[1],
|
||||||
colors only when the output is to the terminal. Defaults to false.
|
linkgit:git-log[1], and linkgit:git-show[1] will use color
|
||||||
|
for all patches. If it is set to `true` or `auto`, those
|
||||||
|
commands will only use color when output is to the terminal.
|
||||||
|
Defaults to false.
|
||||||
|
+
|
||||||
|
This does not affect linkgit:git-format-patch[1] nor the
|
||||||
|
'git-diff-{asterisk}' plumbing commands. Can be overridden on the
|
||||||
|
command line with the `--color[=<when>]` option.
|
||||||
|
|
||||||
color.diff.<slot>::
|
color.diff.<slot>::
|
||||||
Use customized color for diff colorization. `<slot>` specifies
|
Use customized color for diff colorization. `<slot>` specifies
|
||||||
|
@ -796,11 +803,15 @@ color.status.<slot>::
|
||||||
color.branch.<slot>.
|
color.branch.<slot>.
|
||||||
|
|
||||||
color.ui::
|
color.ui::
|
||||||
When set to `always`, always use colors in all git commands which
|
This variable determines the default value for variables such
|
||||||
are capable of colored output. When false (or `never`), never. When
|
as `color.diff` and `color.grep` that control the use of color
|
||||||
set to `true` or `auto`, use colors only when the output is to the
|
per command family. Its scope will expand as more commands learn
|
||||||
terminal. When more specific variables of color.* are set, they always
|
configuration to set a default for the `--color` option. Set it
|
||||||
take precedence over this setting. Defaults to false.
|
to `always` if you want all output not intended for machine
|
||||||
|
consumption to use color, to `true` or `auto` if you want such
|
||||||
|
output to use color when written to the terminal, or to `false` or
|
||||||
|
`never` if you prefer git commands not to use color unless enabled
|
||||||
|
explicitly with some other configuration or the `--color` option.
|
||||||
|
|
||||||
commit.status::
|
commit.status::
|
||||||
A boolean to enable/disable inclusion of status information in the
|
A boolean to enable/disable inclusion of status information in the
|
||||||
|
|
|
@ -120,12 +120,19 @@ any of those replacements occurred.
|
||||||
|
|
||||||
--color[=<when>]::
|
--color[=<when>]::
|
||||||
Show colored diff.
|
Show colored diff.
|
||||||
The value must be always (the default), never, or auto.
|
The value must be `always` (the default for `<when>`), `never`, or `auto`.
|
||||||
|
The default value is `never`.
|
||||||
|
ifdef::git-diff[]
|
||||||
|
It can be changed by the `color.ui` and `color.diff`
|
||||||
|
configuration settings.
|
||||||
|
endif::git-diff[]
|
||||||
|
|
||||||
--no-color::
|
--no-color::
|
||||||
Turn off colored diff, even when the configuration file
|
Turn off colored diff.
|
||||||
gives the default to color output.
|
ifdef::git-diff[]
|
||||||
Same as `--color=never`.
|
This can be used to override configuration settings.
|
||||||
|
endif::git-diff[]
|
||||||
|
It is the same as `--color=never`.
|
||||||
|
|
||||||
--word-diff[=<mode>]::
|
--word-diff[=<mode>]::
|
||||||
Show a word diff, using the <mode> to delimit changed words.
|
Show a word diff, using the <mode> to delimit changed words.
|
||||||
|
|
Loading…
Reference in New Issue