aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/diff-options.txt
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2013-01-16 08:51:58 +0100
committerJunio C Hamano <gitster@pobox.com>2013-01-16 09:41:18 -0800
commit07924d4d50e5304fb53eb60aaba8aef31d4c4e5e (patch)
tree10760d4a006cead5202c480677f94ffac652f667 /Documentation/diff-options.txt
parent07ab4dec80f1c24660ed4bc371849fb4f11a4ee3 (diff)
downloadgit-07924d4d50e5304fb53eb60aaba8aef31d4c4e5e.tar.gz
diff: Introduce --diff-algorithm command line option
Since command line options have higher priority than config file variables and taking previous commit into account, we need a way how to specify myers algorithm on command line. However, inventing `--myers` is not the right answer. We need far more general option, and that is `--diff-algorithm`. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r--Documentation/diff-options.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 39f2c5074c..81e5be13da 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -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