diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-18 03:19:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-18 03:19:08 +0200 |
commit | 1c0b983a777bf283250aaf00c94a9a9d4bf8bc9c (patch) | |
tree | da278177d16ce137f6b19de518b149ba6edcbdca /color.c | |
parent | Merge branch 'js/rebase-i-final' (diff) | |
parent | tag: respect color.ui config (diff) | |
download | git-1c0b983a777bf283250aaf00c94a9a9d4bf8bc9c.tar.xz git-1c0b983a777bf283250aaf00c94a9a9d4bf8bc9c.zip |
Merge branch 'jk/ref-filter-colors-fix'
This is the "theoretically more correct" approach of simply
stepping back to the state before plumbing commands started paying
attention to "color.ui" configuration variable.
Let's run with this one.
* jk/ref-filter-colors-fix:
tag: respect color.ui config
Revert "color: check color.ui in git_default_config()"
Revert "t6006: drop "always" color config tests"
Revert "color: make "always" the same as "auto" in config"
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -308,7 +308,7 @@ int git_config_colorbool(const char *var, const char *value) if (!strcasecmp(value, "never")) return 0; if (!strcasecmp(value, "always")) - return var ? GIT_COLOR_AUTO : 1; + return 1; if (!strcasecmp(value, "auto")) return GIT_COLOR_AUTO; } @@ -368,6 +368,14 @@ int git_color_config(const char *var, const char *value, void *cb) return 0; } +int git_color_default_config(const char *var, const char *value, void *cb) +{ + if (git_color_config(var, value, cb) < 0) + return -1; + + return git_default_config(var, value, cb); +} + void color_print_strbuf(FILE *fp, const char *color, const struct strbuf *sb) { if (*color) |