diff options
Diffstat (limited to 'color.c')
-rw-r--r-- | color.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -308,7 +308,7 @@ int git_config_colorbool(const char *var, const char *value) if (!strcasecmp(value, "never")) return 0; if (!strcasecmp(value, "always")) - return 1; + return var ? GIT_COLOR_AUTO : 1; if (!strcasecmp(value, "auto")) return GIT_COLOR_AUTO; } @@ -338,6 +338,13 @@ static int check_auto_color(void) int want_color(int var) { + /* + * NEEDSWORK: This function is sometimes used from multiple threads, and + * we end up using want_auto racily. That "should not matter" since + * we always write the same value, but it's still wrong. This function + * is listed in .tsan-suppressions for the time being. + */ + static int want_auto = -1; if (var < 0) |