From 07ab4dec80f1c24660ed4bc371849fb4f11a4ee3 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 16 Jan 2013 08:51:57 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/diff-config.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Documentation/diff-config.txt') 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..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". +-- ++ -- cgit v1.2.1