Skip to content

Commit e5f7675

Browse files
committed
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
2 parents 45c0c21 + 5580b27 commit e5f7675

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Documentation/diff-config.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ diff.tool::
170170

171171
include::mergetools-diff.txt[]
172172

173+
diff.compactionHeuristic::
174+
Set this option to `true` to enable an experimental heuristic that
175+
shifts the hunk boundary in an attempt to make the resulting
176+
patch easier to read.
177+
173178
diff.algorithm::
174179
Choose a diff algorithm. The variants are as follows:
175180
+

Documentation/diff-options.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ ifndef::git-format-patch[]
6363
Synonym for `-p --raw`.
6464
endif::git-format-patch[]
6565

66+
--compaction-heuristic::
67+
--no-compaction-heuristic::
68+
These are to help debugging and tuning an experimental
69+
heuristic (which is off by default) that shifts the hunk
70+
boundary in an attempt to make the resulting patch easier
71+
to read.
72+
6673
--minimal::
6774
Spend extra time to make sure the smallest possible
6875
diff is produced.

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#endif
2727

2828
static int diff_detect_rename_default;
29-
static int diff_compaction_heuristic = 1;
29+
static int diff_compaction_heuristic; /* experimental */
3030
static int diff_rename_limit_default = 400;
3131
static int diff_suppress_blank_empty;
3232
static int diff_use_color_default = -1;

0 commit comments

Comments
 (0)