X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-grep.c;h=f88a912ace9195c387566770432a904e2d7adcb7;hb=5e9758e2968238906c730c9c77ecc95c21e7495e;hp=89489ddcf8edb85160036b0336ab4ce80c3cb6bc;hpb=6422c6af38747f008ebffc106f9a5799b26091d0;p=git.git diff --git a/builtin-grep.c b/builtin-grep.c index 89489ddcf..f88a912ac 100644 --- a/builtin-grep.c +++ b/builtin-grep.c @@ -26,16 +26,13 @@ static int grep_config(const char *var, const char *value, void *cb) { struct grep_opt *opt = cb; - if (!strcmp(var, "grep.color") || !strcmp(var, "color.grep")) { + if (!strcmp(var, "color.grep")) { opt->color = git_config_colorbool(var, value, -1); return 0; } - if (!strcmp(var, "grep.color.external") || - !strcmp(var, "color.grep.external")) { + if (!strcmp(var, "color.grep.external")) return git_config_string(&(opt->color_external), var, value); - } - if (!strcmp(var, "grep.color.match") || - !strcmp(var, "color.grep.match")) { + if (!strcmp(var, "color.grep.match")) { if (!value) return config_error_nonbool(var); color_parse(value, var, opt->color_match);