]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-grep.c
Add an optional argument for --color options
[thirdparty/git.git] / builtin-grep.c
index 26d4deb1cce3e5540411a47fdf35085649669d06..00cbd90bf68bc729d9b4d1bdb2fcaa92954010f1 100644 (file)
@@ -782,7 +782,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                        "print NUL after filenames"),
                OPT_BOOLEAN('c', "count", &opt.count,
                        "show the number of matches instead of matching lines"),
-               OPT_SET_INT(0, "color", &opt.color, "highlight matches", 1),
+               OPT__COLOR(&opt.color, "highlight matches"),
                OPT_GROUP(""),
                OPT_CALLBACK('C', NULL, &opt, "n",
                        "show <n> context lines before and after matches",