From: Junio C Hamano Date: Tue, 19 Mar 2013 19:11:31 +0000 (-0700) Subject: Merge branch 'jc/color-diff-doc' X-Git-Tag: v1.8.3-rc0~225 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/3e1b08bbf58173df80895af3bf86d14c77efe877?hp=-c Merge branch 'jc/color-diff-doc' The --color[=] option to the diff family was documented in a confusing way. * jc/color-diff-doc: diff-options: unconfuse description of --color --- 3e1b08bbf58173df80895af3bf86d14c77efe877 diff --combined Documentation/diff-options.txt index 869d965a3b,d33f77a05e..104579dc75 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@@ -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[=[,[,]]]:: 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[=]:: Show colored diff. - The value must be `always` (the default for ``), `never`, or `auto`. - The default value is `never`. + `--color` (i.e. without '=') is the same as `--color=always`. + '' 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[]:: --find-copies[=]::