X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fgrep.c;h=dc6de83ab7c8178fc14d9e27679cb0b22f9caba3;hb=d31f3785dcc10459540e2e185b6e25363f719256;hp=5c2ae94e5576f2e8af1f8509b789a67851db2598;hpb=5e92376f8f70603e570f821267fc86c78175eb09;p=git.git diff --git a/builtin/grep.c b/builtin/grep.c index 5c2ae94e5..dc6de83ab 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -325,11 +325,8 @@ static int grep_config(const char *var, const char *value, void *cb) struct grep_opt *opt = cb; char *color = NULL; - switch (userdiff_config(var, value)) { - case 0: break; - case -1: return -1; - default: return 0; - } + if (userdiff_config(var, value) < 0) + return -1; if (!strcmp(var, "grep.extendedregexp")) { if (git_config_bool(var, value))