From: Junio C Hamano Date: Mon, 11 Jul 2016 17:31:09 +0000 (-0700) Subject: Merge branch 'js/color-on-windows-comment' X-Git-Tag: v2.10.0-rc0~134 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/627c9f248786df91c5ae6b1a1c9c3b9829c18bf1 Merge branch 'js/color-on-windows-comment' 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 --- 627c9f248786df91c5ae6b1a1c9c3b9829c18bf1 diff --cc color.h index 6cae166c2b,085924f123..90627650fc --- a/color.h +++ b/color.h @@@ -12,20 -13,11 +12,15 @@@ struct strbuf * - bg color + ';' 17 (e.g. "48;2;255;255;255;") * - terminating 'm' NUL 2 * - * The above overcounts attr (we only use 5 not 8) and one semicolon - * but it is close enough. + * The above overcounts by one semicolon but it is close enough. + * + * The space for attributes is also slightly overallocated, as + * the negation for some attributes is the same (e.g., nobold and nodim). + * + * We allocate space for 7 attributes. */ -#define COLOR_MAXLEN 70 +#define COLOR_MAXLEN 75 - /* - * 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"