summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/diff-config.txt5
-rw-r--r--Documentation/diff-options.txt7
-rw-r--r--diff.c2
3 files changed, 13 insertions, 1 deletions
diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt
index edba56522b..d78cfc5a37 100644
--- a/Documentation/diff-config.txt
+++ b/Documentation/diff-config.txt
@@ -170,6 +170,11 @@ diff.tool::
include::mergetools-diff.txt[]
+diff.compactionHeuristic::
+ Set this option to `true` to enable an experimental heuristic that
+ shifts the hunk boundary in an attempt to make the resulting
+ patch easier to read.
+
diff.algorithm::
Choose a diff algorithm. The variants are as follows:
+
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 3cb301556e..d9ae681d8f 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -63,6 +63,13 @@ ifndef::git-format-patch[]
Synonym for `-p --raw`.
endif::git-format-patch[]
+--compaction-heuristic::
+--no-compaction-heuristic::
+ These are to help debugging and tuning an experimental
+ heuristic (which is off by default) that shifts the hunk
+ boundary in an attempt to make the resulting patch easier
+ to read.
+
--minimal::
Spend extra time to make sure the smallest possible
diff is produced.
diff --git a/diff.c b/diff.c
index d3734d3181..fa78fc189c 100644
--- a/diff.c
+++ b/diff.c
@@ -26,7 +26,7 @@
#endif
static int diff_detect_rename_default;
-static int diff_compaction_heuristic = 1;
+static int diff_compaction_heuristic; /* experimental */
static int diff_rename_limit_default = 400;
static int diff_suppress_blank_empty;
static int diff_use_color_default = -1;