Merge branch 'jk/diff-compact-heuristic'

It turns out that the earlier effort to update the heuristics may
want to use a bit more time to mature.  Turn it off by default.

* jk/diff-compact-heuristic:
  diff: disable compaction heuristic for now
This commit is contained in:
Junio C Hamano
2016-06-10 15:26:06 -07:00
3 changed files with 13 additions and 1 deletions

View File

@ -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:
+

View File

@ -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.

2
diff.c
View File

@ -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;