Merge branch 'jk/color-and-pager'
* jk/color-and-pager: want_color: automatically fallback to color.ui diff: don't load color config in plumbing config: refactor get_colorbool function color: delay auto-color decision until point of use git_config_colorbool: refactor stdout_is_tty handling diff: refactor COLOR_DIFF from a flag into an int setup_pager: set GIT_PAGER_IN_USE t7006: use test_config helpers test-lib: add helper functions for config t7006: modernize calls to unset Conflicts: builtin/commit.c parse-options.c
This commit is contained in:
2
grep.c
2
grep.c
@ -430,7 +430,7 @@ static int word_char(char ch)
|
||||
static void output_color(struct grep_opt *opt, const void *data, size_t size,
|
||||
const char *color)
|
||||
{
|
||||
if (opt->color && color && color[0]) {
|
||||
if (want_color(opt->color) && color && color[0]) {
|
||||
opt->output(opt, color, strlen(color));
|
||||
opt->output(opt, data, size);
|
||||
opt->output(opt, GIT_COLOR_RESET, strlen(GIT_COLOR_RESET));
|
||||
|
Reference in New Issue
Block a user