diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-20 06:09:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-20 06:09:54 +0200 |
commit | dc46fa36b8dc407512fa41062caf57082a22907a (patch) | |
tree | b64f0fd82bae3638348af34627e396cb545a12bc /builtin-config.c | |
parent | Merge branch 'jc/maint-rebase-am' (diff) | |
parent | Use color.ui variable in scripts too (diff) | |
download | git-dc46fa36b8dc407512fa41062caf57082a22907a.tar.xz git-dc46fa36b8dc407512fa41062caf57082a22907a.zip |
Merge branch 'mk/color'
* mk/color:
Use color.ui variable in scripts too
Diffstat (limited to 'builtin-config.c')
-rw-r--r-- | builtin-config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-config.c b/builtin-config.c index 10447a704f..8ee01bdecd 100644 --- a/builtin-config.c +++ b/builtin-config.c @@ -240,6 +240,10 @@ static int git_get_colorbool_config(const char *var, const char *value) get_diff_color_found = git_config_colorbool(var, value, stdout_is_tty); } + if (!strcmp(var, "color.ui")) { + git_use_color_default = git_config_colorbool(var, value, stdout_is_tty); + return 0; + } return 0; } @@ -267,7 +271,7 @@ static int get_colorbool(int argc, const char **argv) if (!strcmp(get_color_slot, "color.diff")) get_colorbool_found = get_diff_color_found; if (get_colorbool_found < 0) - get_colorbool_found = 0; + get_colorbool_found = git_use_color_default; } if (argc == 1) { |