From: Junio C Hamano Date: Thu, 28 Jul 2016 18:25:55 +0000 (-0700) Subject: Merge branch 'js/color-on-windows-comment' into maint X-Git-Tag: v2.9.3~55 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/52d637c422840c410eb179b5d8960db5863cdea7?ds=inline;hp=-c Merge branch 'js/color-on-windows-comment' into maint For a long time, we carried an in-code comment that said our colored output would work only when we use fprintf/fputs on Windows, which no longer is the case for the past few years. * js/color-on-windows-comment: color.h: remove obsolete comment about limitations on Windows --- 52d637c422840c410eb179b5d8960db5863cdea7 diff --combined color.h index e155d13f78,085924f123..b9ead166b9 --- a/color.h +++ b/color.h @@@ -18,11 -18,6 +18,6 @@@ struct strbuf */ #define COLOR_MAXLEN 70 - /* - * IMPORTANT: Due to the way these color codes are emulated on Windows, - * write them only using printf(), fprintf(), and fputs(). In particular, - * do not use puts() or write(). - */ #define GIT_COLOR_NORMAL "" #define GIT_COLOR_RESET "\033[m" #define GIT_COLOR_BOLD "\033[1m" @@@ -75,13 -70,6 +70,13 @@@ extern int color_stdout_is_tty int git_color_config(const char *var, const char *value, void *cb); int git_color_default_config(const char *var, const char *value, void *cb); +/* + * Set the color buffer (which must be COLOR_MAXLEN bytes) + * to the raw color bytes; this is useful for initializing + * default color variables. + */ +void color_set(char *dst, const char *color_bytes); + int git_config_colorbool(const char *var, const char *value); int want_color(int var); int color_parse(const char *value, char *dst);