Clean up use of ANSI color sequences

Remove the literal ANSI escape sequences and replace them by readable
constants.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Arjen Laarhoven
2009-02-13 22:53:40 +01:00
committed by Junio C Hamano
parent 5cd12b85fe
commit dc6ebd4cc5
6 changed files with 35 additions and 27 deletions

View File

@ -32,11 +32,11 @@ static unsigned char head_sha1[20];
static int branch_use_color = -1;
static char branch_colors[][COLOR_MAXLEN] = {
"\033[m", /* reset */
"", /* PLAIN (normal) */
"\033[31m", /* REMOTE (red) */
"", /* LOCAL (normal) */
"\033[32m", /* CURRENT (green) */
GIT_COLOR_RESET,
GIT_COLOR_NORMAL, /* PLAIN */
GIT_COLOR_RED, /* REMOTE */
GIT_COLOR_NORMAL, /* LOCAL */
GIT_COLOR_GREEN, /* CURRENT */
};
enum color_branch {
COLOR_BRANCH_RESET = 0,