summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorArjen Laarhoven <arjen@yaph.org>2009-02-13 21:53:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-14 01:27:58 (GMT)
commitdc6ebd4cc5028d59146e02e30f7945ee91974e6e (patch)
tree6028f6a7a3e2baf7b24bde5cd2819c148f0a3c68 /pretty.c
parent5cd12b85fe8ff74f202a158511ead34e8aba584c (diff)
downloadgit-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.zip
git-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.tar.gz
git-dc6ebd4cc5028d59146e02e30f7945ee91974e6e.tar.bz2
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>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pretty.c b/pretty.c
index cc460b5..66bae42 100644
--- a/pretty.c
+++ b/pretty.c
@@ -567,16 +567,16 @@ static size_t format_commit_item(struct strbuf *sb, const char *placeholder,
return end - placeholder + 1;
}
if (!prefixcmp(placeholder + 1, "red")) {
- strbuf_addstr(sb, "\033[31m");
+ strbuf_addstr(sb, GIT_COLOR_RED);
return 4;
} else if (!prefixcmp(placeholder + 1, "green")) {
- strbuf_addstr(sb, "\033[32m");
+ strbuf_addstr(sb, GIT_COLOR_GREEN);
return 6;
} else if (!prefixcmp(placeholder + 1, "blue")) {
- strbuf_addstr(sb, "\033[34m");
+ strbuf_addstr(sb, GIT_COLOR_BLUE);
return 5;
} else if (!prefixcmp(placeholder + 1, "reset")) {
- strbuf_addstr(sb, "\033[m");
+ strbuf_addstr(sb, GIT_COLOR_RESET);
return 6;
} else
return 0;