summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'color.c')
-rw-r--r--color.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/color.c b/color.c
index 9c0dc82370..9a9261ac16 100644
--- a/color.c
+++ b/color.c
@@ -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 var ? GIT_COLOR_AUTO : 1;
+ return 1;
if (!strcasecmp(value, "auto"))
return GIT_COLOR_AUTO;
}
@@ -368,6 +368,14 @@ int git_color_config(const char *var, const char *value, void *cb)
return 0;
}
+int git_color_default_config(const char *var, const char *value, void *cb)
+{
+ if (git_color_config(var, value, cb) < 0)
+ return -1;
+
+ return git_default_config(var, value, cb);
+}
+
void color_print_strbuf(FILE *fp, const char *color, const struct strbuf *sb)
{
if (*color)