diff: enable indent heuristic by default
commit33de7163879ca83be7d6e1583c125f84e1e7c329
authorStefan Beller <sbeller@google.com>
Mon, 8 May 2017 16:03:38 +0000 (8 12:03 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 May 2017 03:24:35 +0000 (9 12:24 +0900)
tree89514e7d856b482a1822b6e22c3696bb1542a075
parent37590ce3c535f92e28da83893f843cc0099873bf
diff: enable indent heuristic by default

The feature was included in v2.11 (released 2016-11-29) and we got no
negative feedback. Quite the opposite, all feedback we got was positive.

Turn it on by default. Users who dislike the feature can turn it off
by setting diff.indentHeuristic (which also configures plumbing commands,
see prior patches).

The change to t/t4051-diff-function-context.sh is needed because the
heuristic shifts the changed hunk in the patch.  To get the same result
regardless of the heuristic configuration, we modify the test file
differently:  We insert a completely new line after line 2, instead of
simply duplicating it.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
t/t4051-diff-function-context.sh
t/t4061-diff-indent.sh