Merge branch 'mp/diff-algo-config'
[git.git] / Documentation / diff-options.txt
index 39f2c5074c1ac370976bce36cbceb1a676064cfe..869d965a3b93e25c71fd4c81a7f7742ff2222cfe 100644 (file)
@@ -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
@@ -283,7 +303,7 @@ few lines that happen to match textually as the context, but as a
 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).
 +
@@ -307,7 +327,7 @@ 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.  Without a `%` sign, the number is to be read as
        a fraction, with a decimal point before it.  I.e., `-M5` becomes