summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'color.c')
-rw-r--r--color.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/color.c b/color.c
index fc0b72a..54a3da1 100644
--- a/color.c
+++ b/color.c
@@ -115,7 +115,7 @@ void color_parse(const char *value, const char *var, char *dst)
*dst = 0;
return;
bad:
- die("bad config value '%s' for variable '%s'", value, var);
+ die("bad color value '%s' for variable '%s'", value, var);
}
int git_config_colorbool(const char *var, const char *value, int stdout_is_tty)
@@ -191,3 +191,10 @@ int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...)
va_end(args);
return r;
}
+
+void color_parse_mem(const char *value, int len, const char *var, char *dst)
+{
+ char *tmp = xmemdupz(value, len);
+ color_parse(tmp, var, dst);
+ free(tmp);
+}