status: color in-progress message like other header messages
authorJeff King <peff@peff.net>
Mon, 16 Jul 2012 11:39:54 +0000 (07:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2012 16:37:29 +0000 (09:37 -0700)
The "status" command recently learned to describe the
in-progress operation in its long output format (e.g.,
rebasing, am, etc). This message gets its own slot in the
color table, even though it is not configurable. As a
result, if the user has set color.status.header to a
non-default value, this message will not match (and cannot
be made to match, as there is no config option).

It is probably more sane to just color it like the rest of
the text (i.e., just use color.status.header). This would
not allow users to customize the color of this message
independently, but they cannot do that with the current code
anyway, and if somebody wants to build customizable
colorization later, this patch does not make it much harder
to do so.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c
wt-status.h
index c749267c95bb90a512cc869760d42c4e050b3e81..c110cbc1250b08fe491d60244e1c8f27c0201532 100644 (file)
@@ -24,7 +24,6 @@ static char default_wt_status_colors[][COLOR_MAXLEN] = {
        GIT_COLOR_GREEN,  /* WT_STATUS_LOCAL_BRANCH */
        GIT_COLOR_RED,    /* WT_STATUS_REMOTE_BRANCH */
        GIT_COLOR_NIL,    /* WT_STATUS_ONBRANCH */
        GIT_COLOR_GREEN,  /* WT_STATUS_LOCAL_BRANCH */
        GIT_COLOR_RED,    /* WT_STATUS_REMOTE_BRANCH */
        GIT_COLOR_NIL,    /* WT_STATUS_ONBRANCH */
-       GIT_COLOR_NORMAL, /* WT_STATUS_IN_PROGRESS */
 };
 
 static const char *color(int slot, struct wt_status *s)
 };
 
 static const char *color(int slot, struct wt_status *s)
@@ -931,7 +930,7 @@ static void show_bisect_in_progress(struct wt_status *s,
 
 static void wt_status_print_state(struct wt_status *s)
 {
 
 static void wt_status_print_state(struct wt_status *s)
 {
-       const char *state_color = color(WT_STATUS_IN_PROGRESS, s);
+       const char *state_color = color(WT_STATUS_HEADER, s);
        struct wt_status_state state;
        struct stat st;
 
        struct wt_status_state state;
        struct stat st;
 
index c1066a0ec61a5ccc62aa31d53b68dec765a9770d..f8fc58cc0ac8ec73d81fba441b1899b934eaadb4 100644 (file)
@@ -15,7 +15,6 @@ enum color_wt_status {
        WT_STATUS_LOCAL_BRANCH,
        WT_STATUS_REMOTE_BRANCH,
        WT_STATUS_ONBRANCH,
        WT_STATUS_LOCAL_BRANCH,
        WT_STATUS_REMOTE_BRANCH,
        WT_STATUS_ONBRANCH,
-       WT_STATUS_IN_PROGRESS,
        WT_STATUS_MAXSLOT
 };
 
        WT_STATUS_MAXSLOT
 };