Merge branch 'mg/diff-uiconfig-doc' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 16:41:11 +0000 (09:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 May 2011 16:41:11 +0000 (09:41 -0700)
* mg/diff-uiconfig-doc:
config.txt,diff-options.txt: porcelain vs. plumbing for color.diff

1  2 
Documentation/config.txt
Documentation/diff-options.txt
diff --combined Documentation/config.txt
index 0906499e7d26ac1e808f3a598675a32a7ad72739,3967b1a4735158980cb4aa875bfa3fcddc142cf5..a9adfa0a70902e09ae4cef61cf66f4acadf83224
@@@ -442,6 -442,8 +442,6 @@@ for most projects as source code and ot
  be delta compressed, but larger binary media files won't be.
  +
  Common unit suffixes of 'k', 'm', or 'g' are supported.
 -+
 -Currently only linkgit:git-fast-import[1] honors this setting.
  
  core.excludesfile::
        In addition to '.gitignore' (per-directory) and
@@@ -706,9 -708,16 +706,16 @@@ second is the background.  The positio
  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 -803,15 +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
index c32105f1ed35f53a0922f32ad3fb271592d79d28,c26e494d07bdee78c4017c122e651b7c6bfc39bc..80fd817c28029d1b13e21b6c80da20b564ce9e42
@@@ -72,10 -72,6 +72,10 @@@ endif::git-format-patch[
        a cut-off percent (3% by default) are not shown. The cut-off percent
        can be set with `--dirstat=<limit>`. Changes in a child directory are not
        counted for the parent directory, unless `--cumulative` is used.
 ++
 +Note that the `--dirstat` option computes the changes while ignoring
 +the amount of pure code movements within a file.  In other words,
 +rearranging lines in a file is not counted as much as other changes.
  
  --dirstat-by-file[=<limit>]::
        Same as `--dirstat`, but counts changed files instead of lines.
@@@ -124,12 -120,19 +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.
@@@ -243,7 -246,7 +250,7 @@@ ifdef::git-log[
        For following files across renames while traversing history, see
        `--follow`.
  endif::git-log[]
 -      If `n` is specified, it is a is a threshold on the similarity
 +      If `n` is specified, it is a threshold on the similarity
        index (i.e. amount of addition/deletions compared to the
        file's size). For example, `-M90%` means git should consider a
        delete/add pair to be a rename if more than 90% of the file