On Mon, 3 Dec 2018 at 22:21, Eric Sunshine [off-list ref] wrote:
[es: retain diff coloring when going to stdout]
Signed-off-by: Martin Ågren <redacted>
Signed-off-by: Eric Sunshine <redacted>
---
This is a re-roll of Martin's v2[1]. The only difference from v2 is that
it retains coloring when emitting to the terminal (plus an in-code
comment was simplified).
Thank you so much for this.
if (rev->rdiff1) {
+ /*
+ * Pass minimum required diff-options to range-diff; others
+ * can be added later if deemed desirable.
+ */
Agreed.
+ struct diff_options opts;
+ diff_setup(&opts);
+ opts.file = rev->diffopt.file;
+ opts.use_color = rev->diffopt.use_color;
Ah, s/0/rev->diffopt.use_color/, well that's obvious.
Thanks!
Martin