On Mon, 3 Dec 2018 at 22:21, Eric Sunshine <[email protected]> wrote:
> [es: retain diff coloring when going to stdout]
>
> Signed-off-by: Martin Ågren <[email protected]>
> Signed-off-by: Eric Sunshine <[email protected]>
> ---
>
> 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