summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7134973)
raw | patch | inline | side by side (parent: 7134973)
author | Matthias Kestenholz <mk@spinlock.ch> | |
Wed, 9 Apr 2008 19:32:06 +0000 (21:32 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Apr 2008 19:40:50 +0000 (12:40 -0700) |
Signed-off-by: Matthias Kestenholz <mk@spinlock.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-config.txt | patch | blob | history | |
builtin-config.c | patch | blob | history |
index fa161718dd33a0b4c3b58fb3898e74369bcc3d94..5de5d051b7917daabd0ef7c0681c6b75307a931a 100644 (file)
"auto". If `stdout-is-tty` is missing, then checks the standard
output of the command itself, and exits with status 0 if color
is to be used, or exits with status 1 otherwise.
+ When the color setting for `name` is undefined, the command uses
+ `color.ui` as fallback.
--get-color name default::
diff --git a/builtin-config.c b/builtin-config.c
index c34bc8b6a6957ccee1db23a3c44c99e058384689..eccb7e7764c56357b33925f2a7ad12b9b242c94d 100644 (file)
--- a/builtin-config.c
+++ b/builtin-config.c
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;
}
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) {