aboutsummaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorMatthias Kestenholz <mk@spinlock.ch>2008-04-09 21:32:06 +0200
committerJunio C Hamano <gitster@pobox.com>2008-04-10 12:40:50 -0700
commit4d4f5ba3ea9d22137f86f1d8e574a667e76e45bf (patch)
tree99e9ad23dc5b36bea9af048d46336614b740c55d /builtin-config.c
parent71349732c53a4c1b64729628b04db7b3c3f7606d (diff)
downloadgit-4d4f5ba3ea9d22137f86f1d8e574a667e76e45bf.tar.gz
git-4d4f5ba3ea9d22137f86f1d8e574a667e76e45bf.tar.xz
Use color.ui variable in scripts too
Signed-off-by: Matthias Kestenholz <mk@spinlock.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-config.c b/builtin-config.c
index c34bc8b6a..eccb7e776 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -224,6 +224,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;
}
@@ -251,7 +255,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) {