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:
@ -325,7 +325,7 @@ static int grep_config(const char *var, const char *value, void *cb)
|
||||
}
|
||||
|
||||
if (!strcmp(var, "color.grep"))
|
||||
opt->color = git_config_colorbool(var, value, -1);
|
||||
opt->color = git_config_colorbool(var, value);
|
||||
else if (!strcmp(var, "color.grep.context"))
|
||||
color = opt->color_context;
|
||||
else if (!strcmp(var, "color.grep.filename"))
|
||||
@ -898,8 +898,6 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
|
||||
strcpy(opt.color_sep, GIT_COLOR_CYAN);
|
||||
opt.color = -1;
|
||||
git_config(grep_config, &opt);
|
||||
if (opt.color == -1)
|
||||
opt.color = git_use_color_default;
|
||||
|
||||
/*
|
||||
* If there is no -- then the paths must exist in the working
|
||||
|
||||
Reference in New Issue
Block a user