• Jeff King's avatar
    range-diff: use a hunk callback · d2eb8093
    Jeff King authored
    When we count the lines in a diff, we don't actually care about the
    contents of each line. By using a hunk callback, we tell xdiff that it
    does not need to even bother generating a hunk header line, saving a
    small amount of work.
    
    Arguably we could even ignore the hunk headers completely, since we're
    just computing a cost function between patches. But doing it this way
    maintains the exact same behavior before and after.
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    d2eb8093
range-diff.c 11.1 KB