summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-02 04:59:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-02 04:59:31 (GMT)
commit66b8800e53b20cda13446b462531641884089a77 (patch)
tree53ef62b1b878ee340809499296fdad4a898f3db3 /builtin/grep.c
parent260eb7e38966bdad79aae2e125c9a07b19abd0f8 (diff)
parentcbb08c2e0b41ab162838aa1e83b959bac91151e2 (diff)
downloadgit-66b8800e53b20cda13446b462531641884089a77.zip
git-66b8800e53b20cda13446b462531641884089a77.tar.gz
git-66b8800e53b20cda13446b462531641884089a77.tar.bz2
Merge branch 'rs/no-no-no-parseopt'
* rs/no-no-no-parseopt: parse-options: remove PARSE_OPT_NEGHELP parse-options: allow positivation of options starting, with no- test-parse-options: convert to OPT_BOOL() Conflicts: builtin/grep.c
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index e4ea900..643938d 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,