Skip to content
  • Stefan Beller's avatar
    diff: enable indent heuristic by default · 33de7163
    Stefan Beller authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarStefan Beller <sbeller@google.com>
    Signed-off-by: default avatarMarc Branchaud <marcnarc@xiplink.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    33de7163