Reputation: 16234
What is the syntax for the name
to be used in git config --get-color name
?
I tried the following to find out the built-in default color for [status] added
but all returned nothing:
git config --get-color status.added
git config --get-color color.status.added
git config --get-color color.added
Upvotes: 1
Views: 70
Reputation: 1324318
The syntax is: (see git config color.status.<slot>
)
git config --get-color color.status.added
But if it returns nothing, that simply means it uses the default color for that slot.
See "Colors in Git".
The default colors are defined in wt-status.c
:
static char default_wt_status_colors[][COLOR_MAXLEN] = {
GIT_COLOR_NORMAL, /* WT_STATUS_HEADER */
GIT_COLOR_GREEN, /* WT_STATUS_UPDATED */
GIT_COLOR_RED, /* WT_STATUS_CHANGED */
GIT_COLOR_RED, /* WT_STATUS_UNTRACKED */
GIT_COLOR_RED, /* WT_STATUS_NOBRANCH */
GIT_COLOR_RED, /* WT_STATUS_UNMERGED */
GIT_COLOR_GREEN, /* WT_STATUS_LOCAL_BRANCH */
GIT_COLOR_RED, /* WT_STATUS_REMOTE_BRANCH */
GIT_COLOR_NIL, /* WT_STATUS_ONBRANCH */
};
Upvotes: 1