aboutsummaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorMark Lodato <lodatom@gmail.com>2010-03-07 11:52:45 -0500
committerJunio C Hamano <gitster@pobox.com>2010-03-07 11:09:02 -0800
commit758df17ab07a58e5b0f8effdf2d1b71fe8d79f1d (patch)
treebbcecc76088e6a6b690bae7a9ea75997a3d2b48f /builtin-grep.c
parentdc05d73104fda239fc03342e0b53aa5741c53531 (diff)
downloadgit-758df17ab07a58e5b0f8effdf2d1b71fe8d79f1d.tar.gz
git-758df17ab07a58e5b0f8effdf2d1b71fe8d79f1d.tar.xz
Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*
Add GIT_COLOR_BOLD_* macros to set both bold and the color in one sequence. This saves two characters of output ("ESC [ m", minus ";") and makes the code more readable. Add the remaining GIT_COLOR_BG_* macros to make the list complete. The white and black colors are not included since they look bad on most terminals. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 552ef1fac..dcc3d4841 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -871,7 +871,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
opt.regflags = REG_NEWLINE;
opt.max_depth = -1;
- strcpy(opt.color_match, GIT_COLOR_RED GIT_COLOR_BOLD);
+ strcpy(opt.color_match, GIT_COLOR_BOLD_RED);
opt.color = -1;
git_config(grep_config, &opt);
if (opt.color == -1)