summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-20 23:02:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-20 23:02:33 (GMT)
commit73018c0f0b2fa9d771a6991f18f9e9eb2c10e14d (patch)
tree4f6b754e9d3dda92d9cf8b34890637dac347bf75 /builtin/config.c
parent08bcd774f497af594f16e545a04e2ad767cc850d (diff)
parent4c7f1819b3c142ace98269a556bc929c80e7c9fd (diff)
downloadgit-73018c0f0b2fa9d771a6991f18f9e9eb2c10e14d.zip
git-73018c0f0b2fa9d771a6991f18f9e9eb2c10e14d.tar.gz
git-73018c0f0b2fa9d771a6991f18f9e9eb2c10e14d.tar.bz2
Merge branch 'mm/color-auto-default'
Flip the default for color.ui to 'auto', which is what many tutorials recommend new users to do. * mm/color-auto-default: make color.ui default to 'auto' config: refactor management of color.ui's default value
Diffstat (limited to 'builtin/config.c')
-rw-r--r--builtin/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 19ffcaf..7759671 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -329,6 +329,7 @@ static int get_colorbool(int print)
{
get_colorbool_found = -1;
get_diff_color_found = -1;
+ get_color_ui_found = -1;
git_config_with_options(git_get_colorbool_config, NULL,
given_config_file, respect_includes);
@@ -339,6 +340,10 @@ static int get_colorbool(int print)
get_colorbool_found = get_color_ui_found;
}
+ if (get_colorbool_found < 0)
+ /* default value if none found in config */
+ get_colorbool_found = GIT_COLOR_AUTO;
+
get_colorbool_found = want_color(get_colorbool_found);
if (print) {