This is based on origin/js/range-diff (c255a588bcd) and is also available via git fetch https://github.com/stefanbeller/git ws_cleanup-ontop-range-diff-2 This adds some color testing to range-diff and then attempts to make the code in diff.c around emit_line_0 more readable. I think we can go further bit more (by e.g. cherry-picking "ws: do not reset and set color twice" found at [1]), but that would be feature work. This series doesn't change any existing tests! [1] https://github.com/stefanbeller/git/tree/ws_cleanup-ontop-range-diff Thanks, Stefan Stefan Beller (8): test_decode_color: understand FAINT and ITALIC t3206: add color test for range-diff --dual-color diff.c: simplify caller of emit_line_0 diff.c: reorder arguments for emit_line_ws_markup diff.c: add set_sign to emit_line_0 diff: use emit_line_0 once per line diff.c: compute reverse locally in emit_line_0 diff.c: rewrite emit_line_0 more understandably diff.c | 94 +++++++++++++++++++++++------------------ t/t3206-range-diff.sh | 39 +++++++++++++++++ t/test-lib-functions.sh | 2 + 3 files changed, 93 insertions(+), 42 deletions(-) -- 2.18.0.345.g5c9ce644c3-goog