X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wt-status.c;h=8836a527d0b1980bd4ebdd50b3225f7ce37ccf79;hb=116eb3abfe4f79907f701317c2d905868941fff7;hp=02377729c401fa6e041a713a89fe986fa0f562a0;hpb=503359f13abc251ecbcd6a135918efbc58a4e6f6;p=git.git diff --git a/wt-status.c b/wt-status.c index 02377729c..8836a527d 100644 --- a/wt-status.c +++ b/wt-status.c @@ -26,7 +26,9 @@ static char default_wt_status_colors[][COLOR_MAXLEN] = { static const char *color(int slot, struct wt_status *s) { - const char *c = s->use_color > 0 ? s->color_palette[slot] : ""; + const char *c = ""; + if (want_color(s->use_color)) + c = s->color_palette[slot]; if (slot == WT_STATUS_ONBRANCH && color_is_nil(c)) c = s->color_palette[WT_STATUS_HEADER]; return c; @@ -681,7 +683,7 @@ static void wt_status_print_verbose(struct wt_status *s) * will have checked isatty on stdout). */ if (s->fp != stdout) - DIFF_OPT_CLR(&rev.diffopt, COLOR_DIFF); + rev.diffopt.use_color = 0; run_diff_index(&rev, 1); }