Jacob Keller <jacob.keller@xxxxxxxxx> writes: > I think we could use the indentation trick and it might help in this > case. I agree, let's disable this for this cycle and experiment in the > next one. Good catch, Peff. > > As others have said you will always be able to produce counter > examples, that's the nature of heuristics. The idea is to see if we > can come up with something simple that mostly improves the output, > even if sometimes it might have a negative impact on the outputs. But > I think we should avoid changing behavior unless it's mostly an > improvement. OK, let's do this then for the upcoming release for now. I am tempted to flip it back on after the release in 'next', so that developers would be exposed to the heuristic by default, though. -- >8 -- Subject: [PATCH] diff: disable compaction heuristic for now http://lkml.kernel.org/g/20160610075043.GA13411@xxxxxxxxxxxxxxxxxxxxx reports that a change to add a new "function" with common ending with the existing one at the end of the file is shown like this: def foo do_foo_stuff() + common_ending() +end + +def bar + do_bar_stuff() + common_ending() end when the new heuristic is in use. In reality, the change is to add the blank line before "def bar" and everything below, which is what the code without the new heuristic shows. Disable the heuristics by default and leave it as an experimental feature for now. Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff.c b/diff.c index 05ca3ce..9116d9d 100644 --- a/diff.c +++ b/diff.c @@ -25,7 +25,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; -- 2.9.0-rc2-275-g493bdbb -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html