summaryrefslogtreecommitdiff
path: root/wt-status.c
diff options
context:
space:
mode:
Diffstat (limited to 'wt-status.c')
-rw-r--r--wt-status.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c
index 9f4e0ba..8836a52 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;
@@ -642,7 +644,7 @@ static void wt_status_print_other(struct wt_status *s,
int i;
struct strbuf buf = STRBUF_INIT;
- if (!s->untracked.nr)
+ if (!l->nr)
return;
wt_status_print_other_header(s, what, how);
@@ -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);
}