diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/branch.c | 2 | ||||
-rw-r--r-- | builtin/config.c | 2 | ||||
-rw-r--r-- | builtin/show-branch.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index b15fee5e3..d6d3c7d85 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -88,7 +88,7 @@ static int git_branch_config(const char *var, const char *value, void *cb) static const char *branch_get_color(enum color_branch ix) { - if (branch_use_color > 0) + if (want_color(branch_use_color)) return branch_colors[ix]; return ""; } diff --git a/builtin/config.c b/builtin/config.c index 5505ced8c..3a092966d 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -330,6 +330,8 @@ static int get_colorbool(int print) get_colorbool_found = git_use_color_default; } + get_colorbool_found = want_color(get_colorbool_found); + if (print) { printf("%s\n", get_colorbool_found ? "true" : "false"); return 0; diff --git a/builtin/show-branch.c b/builtin/show-branch.c index e6650b483..4b726fabd 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -26,14 +26,14 @@ static const char **default_arg; static const char *get_color_code(int idx) { - if (showbranch_use_color) + if (want_color(showbranch_use_color)) return column_colors_ansi[idx % column_colors_ansi_max]; return ""; } static const char *get_color_reset_code(void) { - if (showbranch_use_color) + if (want_color(showbranch_use_color)) return GIT_COLOR_RESET; return ""; } |