]> asedeno.scripts.mit.edu Git - git.git/blobdiff - wt-status.c
Merge branch 'jk/noetcconfig'
[git.git] / wt-status.c
index 27b946d55299d66031b31949da187ffb670e484b..0b060934e218f1d6fb95777ea7dd7faef1c2dd93 100644 (file)
@@ -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 <file>...\" to unstage)", s->reference);
        } else {
                color_fprintf_ln(s->fp, c, "#   (use \"git rm --cached <file>...\" to unstage)");
@@ -392,6 +392,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;
        }