From 3cde4e02ee891bff53bac7f6a7d977f50418a4b5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 23 Dec 2016 12:32:22 -0800 Subject: diff: retire "compaction" heuristics When a patch inserts a block of lines, whose last lines are the same as the existing lines that appear before the inserted block, "git diff" can choose any place between these existing lines as the boundary between the pre-context and the added lines (adjusting the end of the inserted block as appropriate) to come up with variants of the same patch, and some variants are easier to read than others. We have been trying to improve the choice of this boundary, and Git 2.11 shipped with an experimental "compaction-heuristic". Since then another attempt to improve the logic further resulted in a new "indent-heuristic" logic. It is agreed that the latter gives better result overall, and the former outlived its usefulness. Retire "compaction", and keep "indent" as an experimental feature. The latter hopefully will be turned on by default in a future release, but that should be done as a separate step. Suggested-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/diff-config.txt | 6 ++---- Documentation/diff-heuristic-options.txt | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'Documentation') diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index 58f4bd6afa..d8570f2a75 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -172,10 +172,8 @@ diff.tool:: include::mergetools-diff.txt[] diff.indentHeuristic:: -diff.compactionHeuristic:: - Set one of these options to `true` to enable one of two - experimental heuristics that shift diff hunk boundaries to - make patches easier to read. + Set this option to `true` to enable experimental heuristics + that shift diff hunk boundaries to make patches easier to read. diff.algorithm:: Choose a diff algorithm. The variants are as follows: diff --git a/Documentation/diff-heuristic-options.txt b/Documentation/diff-heuristic-options.txt index 36cb549df9..d4f3d95505 100644 --- a/Documentation/diff-heuristic-options.txt +++ b/Documentation/diff-heuristic-options.txt @@ -1,7 +1,5 @@ --indent-heuristic:: --no-indent-heuristic:: ---compaction-heuristic:: ---no-compaction-heuristic:: These are to help debugging and tuning experimental heuristics (which are off by default) that shift diff hunk boundaries to make patches easier to read. -- cgit v1.2.3