• Eric Sunshine's avatar
    range-diff: relieve callers of low-level configuration burden · 73a834e9
    Eric Sunshine authored
    There are a number of very low-level configuration details which need to
    be managed precisely to generate a proper range-diff. In particular,
    'diff_options' output format, header suppression, indentation, and
    dual-color mode must all be set appropriately to ensure proper behavior.
    Handle these details locally in the libified range-diff back-end rather
    than forcing each caller to have specialized knowledge of these
    implementation details, and to avoid duplication as new callers are
    While at it, localize these tweaks to be active only while generating
    the range-diff, so they don't clobber the caller-provided
    'diff_options', which might be used beyond range-diff generation.
    Signed-off-by: Eric Sunshine's avatarEric Sunshine <sunshine@sunshineco.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
range-diff.c 11.5 KB