From: Martin Ågren Date: Tue, 04 Dec 2018 05:40:42 GMT Subject: Re: [PATCH v3] range-diff: always pass at least minimal diff options Message-ID: In-Reply-To: <20181203212131.11299-1-sunshine@sunshineco.com> On Mon, 3 Dec 2018 at 22:21, Eric Sunshine wrote: > [es: retain diff coloring when going to stdout] > > Signed-off-by: Martin Ågren > Signed-off-by: Eric Sunshine > --- > > 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