X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fgrep.c;h=643938d905fb134a1e65e3684e8e5feb06b01a59;hb=b476064544b9a64d062acc5e3c6be831ebb721cb;hp=e4ea90078384f198f5985596c64deb5f423e9e45;hpb=f1f1b96e99fa064ed9f0da263d4b4eb0407b3ceb;p=git.git diff --git a/builtin/grep.c b/builtin/grep.c index e4ea90078..643938d90 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -684,9 +684,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix) struct option options[] = { OPT_BOOLEAN(0, "cached", &cached, "search in index instead of in the work tree"), - { OPTION_BOOLEAN, 0, "index", &use_index, NULL, - "finds in contents not managed by git", - PARSE_OPT_NOARG | PARSE_OPT_NEGHELP }, + OPT_NEGBIT(0, "no-index", &use_index, + "finds in contents not managed by git", 1), OPT_BOOLEAN(0, "untracked", &untracked, "search in both tracked and untracked files"), OPT_SET_INT(0, "exclude-standard", &opt_exclude,