*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)
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);
+}
int git_color_default_config(const char *var, const char *value, void *cb);
int git_config_colorbool(const char *var, const char *value, int stdout_is_tty);
-void color_parse(const char *var, const char *value, char *dst);
+void color_parse(const char *value, const char *var, char *dst);
+void color_parse_mem(const char *value, int len, const char *var, char *dst);
int color_fprintf(FILE *fp, const char *color, const char *fmt, ...);
int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...);