summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-05-26 16:41:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-26 16:41:11 (GMT)
commit5f8937db39c4eb495a48931172348200a91821a3 (patch)
tree7c34918c45f02e8543c910c16dbf51d69913727c
parentb73f3d2c7db2e4d9f02ff9d24852685bcb6fa38a (diff)
parent6999c54029b42ea996c2fff4fa37303f79b9d8c2 (diff)
downloadgit-5f8937db39c4eb495a48931172348200a91821a3.zip
git-5f8937db39c4eb495a48931172348200a91821a3.tar.gz
git-5f8937db39c4eb495a48931172348200a91821a3.tar.bz2
Merge branch 'mg/diff-uiconfig-doc' into maint
* mg/diff-uiconfig-doc: config.txt,diff-options.txt: porcelain vs. plumbing for color.diff
-rw-r--r--Documentation/config.txt27
-rw-r--r--Documentation/diff-options.txt15
2 files changed, 30 insertions, 12 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 0906499..a9adfa0 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -706,9 +706,16 @@ second is the background. The position of the attribute, if any,
doesn't matter.
color.diff::
- When set to `always`, always use colors in patch.
- When false (or `never`), never. When set to `true` or `auto`, use
- colors only when the output is to the terminal. Defaults to false.
+ Whether to use ANSI escape sequences to add color to patches.
+ If this is set to `always`, linkgit:git-diff[1],
+ 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>::
Use customized color for diff colorization. `<slot>` specifies
@@ -794,11 +801,15 @@ color.status.<slot>::
color.branch.<slot>.
color.ui::
- When set to `always`, always use colors in all git commands which
- are capable of colored output. When false (or `never`), never. When
- set to `true` or `auto`, use colors only when the output is to the
- terminal. When more specific variables of color.* are set, they always
- take precedence over this setting. Defaults to false.
+ This variable determines the default value for variables such
+ as `color.diff` and `color.grep` that control the use of color
+ per command family. Its scope will expand as more commands learn
+ configuration to set a default for the `--color` option. Set it
+ 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::
A boolean to enable/disable inclusion of status information in the
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index c32105f..80fd817 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -124,12 +124,19 @@ any of those replacements occurred.
--color[=<when>]::
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::
- Turn off colored diff, even when the configuration file
- gives the default to color output.
- Same as `--color=never`.
+ Turn off colored diff.
+ifdef::git-diff[]
+ This can be used to override configuration settings.
+endif::git-diff[]
+ It is the same as `--color=never`.
--word-diff[=<mode>]::
Show a word diff, using the <mode> to delimit changed words.