summaryrefslogtreecommitdiff
path: root/Documentation/diff-config.txt
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2013-01-16 08:51:57 +0100
committerJunio C Hamano <gitster@pobox.com>2013-01-16 09:37:45 -0800
commit07ab4dec80f1c24660ed4bc371849fb4f11a4ee3 (patch)
tree3f9fc184e856b805b2d7a52873fd7f6ea6aee313 /Documentation/diff-config.txt
parent216120ab8387c5c9c13b673eab2ff5e1d2d9cbb7 (diff)
downloadgit-07ab4dec80f1c24660ed4bc371849fb4f11a4ee3.tar.gz
config: Introduce diff.algorithm variable
Some users or projects prefer different algorithms over others, e.g. patience over myers or similar. However, specifying appropriate argument every time diff is to be used is impractical. Moreover, creating an alias doesn't play nicely with other tools based on diff (git-show for instance). Hence, a configuration variable which is able to set specific algorithm is needed. For now, these four values are accepted: 'myers' (which has the same effect as not setting the config variable at all), 'minimal', 'patience' and 'histogram'. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-config.txt')
-rw-r--r--Documentation/diff-config.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index 4314ad0fbb..b8a8724f6f 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -155,3 +155,20 @@ diff.tool::
"kompare". Any other value is treated as a custom diff tool,
and there must be a corresponding `difftool.<tool>.cmd`
option.
+
+diff.algorithm::
+ 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".
+--
++