color: delay auto-color decision until point of use
[git/git.git] / builtin / config.c
index 5505ced..3a09296 100644 (file)
@@ -330,6 +330,8 @@ static int get_colorbool(int print)
                        get_colorbool_found = git_use_color_default;
        }
 
+       get_colorbool_found = want_color(get_colorbool_found);
+
        if (print) {
                printf("%s\n", get_colorbool_found ? "true" : "false");
                return 0;