]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/color-on-windows-comment'
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:09 +0000 (10:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:09 +0000 (10:31 -0700)
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

1  2 
color.h

diff --cc color.h
index 6cae166c2b222f008a3c801bec5c485c6fc0b2ff,085924f123e740a228724cb8c006efaa3fecc7ad..90627650fccc67c31261977a22544af131812bd1
+++ 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"