Thread (9 messages) 9 messages, 5 authors, 2018-12-04

Re: [PATCH v3] range-diff: always pass at least minimal diff options

From: Martin Ågren <hidden>
Date: 2018-12-04 05:40:55

Possibly related (same subject, not in this thread)

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help