diff: use emit_line_0 once per line
authorStefan Beller <sbeller@google.com>
Tue, 14 Aug 2018 01:41:20 +0000 (18:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Aug 2018 21:03:05 +0000 (14:03 -0700)
commit29ef759d7ca039590240890a604be8308b30a069
tree0451b2733583f158fd37251ed1e514752055d55d
parent017ac45e87074a51e7bf926b8f87152a1af9a441
diff: use emit_line_0 once per line

All lines that use emit_line_0 multiple times per line, are combined
into a single call to emit_line_0, making use of the 'set' argument.

We gain a little efficiency here, as we can omit emission of color and
accompanying reset if 'len == 0'.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
t/t3206-range-diff.sh