X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wt-status.c;h=991e373785bec5f2aab2d2a09c7d1cb6e3640196;hb=47e83e3cc0b5b5e2402afb34b7617515f905b7a7;hp=c0c247243b562a7579ff780b80dffef4774b60a9;hpb=cab31fa076253fcfafa7572c24e40f12a1e09ae3;p=git.git diff --git a/wt-status.c b/wt-status.c index c0c247243..991e37378 100644 --- a/wt-status.c +++ b/wt-status.c @@ -60,7 +60,7 @@ static void wt_status_print_cached_header(struct wt_status *s) { const char *c = color(WT_STATUS_HEADER); color_fprintf_ln(s->fp, c, "# Changes to be committed:"); - if (s->reference) { + if (!s->is_initial) { color_fprintf_ln(s->fp, c, "# (use \"git reset %s ...\" to unstage)", s->reference); } else { color_fprintf_ln(s->fp, c, "# (use \"git rm --cached ...\" to unstage)"); @@ -402,6 +402,8 @@ int git_status_config(const char *k, const char *v) } if (!prefixcmp(k, "status.color.") || !prefixcmp(k, "color.status.")) { int slot = parse_status_slot(k, 13); + if (!v) + return config_error_nonbool(k); color_parse(v, k, wt_status_colors[slot]); return 0; }