Merge branch 'jc/color-diff-doc'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Mar 2013 19:11:31 +0000 (12:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Mar 2013 19:11:32 +0000 (12:11 -0700)
The --color[=<when>] option to the diff family was documented in a
confusing way.

* jc/color-diff-doc:
diff-options: unconfuse description of --color

1  2 
Documentation/diff-options.txt
index 869d965a3b93e25c71fd4c81a7f7742ff2222cfe,d33f77a05e879905d2d2e3415dd58d68dc17dc18..104579dc75128811e475d408035569ac09f3283b
@@@ -55,26 -55,6 +55,26 @@@ endif::git-format-patch[
  --histogram::
        Generate a diff using the "histogram diff" algorithm.
  
 +--diff-algorithm={patience|minimal|histogram|myers}::
 +      Choose a diff algorithm. The variants are as follows:
 ++
 +--
 +`default`, `myers`;;
 +      The basic greedy diff algorithm. Currently, this is the default.
 +`minimal`;;
 +      Spend extra time to make sure the smallest possible diff is
 +      produced.
 +`patience`;;
 +      Use "patience diff" algorithm when generating patches.
 +`histogram`;;
 +      This algorithm extends the patience algorithm to "support
 +      low-occurrence common elements".
 +--
 ++
 +For instance, if you configured diff.algorithm variable to a
 +non-default value and want to use the default one, then you
 +have to use `--diff-algorithm=default` option.
 +
  --stat[=<width>[,<name-width>[,<count>]]]::
        Generate a diffstat. By default, as much space as necessary
        will be used for the filename part, and the rest for the graph
@@@ -190,13 -170,12 +190,13 @@@ any of those replacements occurred
        the commits in the range like linkgit:git-submodule[1] `summary` does.
        Omitting the `--submodule` option or specifying `--submodule=short`,
        uses the 'short' format. This format just shows the names of the commits
 -      at the beginning and end of the range.
 +      at the beginning and end of the range.  Can be tweaked via the
 +      `diff.submodule` configuration variable.
  
  --color[=<when>]::
        Show colored diff.
-       The value must be `always` (the default for `<when>`), `never`, or `auto`.
-       The default value is `never`.
+       `--color` (i.e. without '=<when>') is the same as `--color=always`.
+       '<when>' can be one of `always`, `never`, or `auto`.
  ifdef::git-diff[]
        It can be changed by the `color.ui` and `color.diff`
        configuration settings.
@@@ -303,7 -282,7 +303,7 @@@ few lines that happen to match textuall
  single deletion of everything old followed by a single insertion of
  everything new, and the number `m` controls this aspect of the -B
  option (defaults to 60%). `-B/70%` specifies that less than 30% of the
 -original should remain in the result for git to consider it a total
 +original should remain in the result for Git to consider it a total
  rewrite (i.e. otherwise the resulting patch will be a series of
  deletion and insertion mixed together with context lines).
  +
@@@ -327,13 -306,9 +327,13 @@@ ifdef::git-log[
  endif::git-log[]
        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
 +      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
 -      hasn't changed.
 +      hasn't changed.  Without a `%` sign, the number is to be read as
 +      a fraction, with a decimal point before it.  I.e., `-M5` becomes
 +      0.5, and is thus the same as `-M50%`.  Similarly, `-M05` is
 +      the same as `-M5%`.  To limit detection to exact renames, use
 +      `-M100%`.
  
  -C[<n>]::
  --find-copies[=<n>]::