summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59332d1)
raw | patch | inline | side by side (parent: 59332d1)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Thu, 15 Sep 2011 18:26:02 +0000 (20:26 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 15 Sep 2011 19:17:56 +0000 (12:17 -0700) |
Utilize the PARSE_OPT_NEGHELP option to show --no-index in the usage
generated by parse-options.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
generated by parse-options.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index 0ef849cb84650705ffc840aed8a3fcedbeb48f9a..e3eeb77cc789796d659cbd9eb28af189bdcf4ee4 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
struct option options[] = {
OPT_BOOLEAN(0, "cached", &cached,
"search in index instead of in the work tree"),
- OPT_BOOLEAN(0, "index", &use_index,
- "--no-index finds in contents not managed by git"),
+ { OPTION_BOOLEAN, 0, "index", &use_index, NULL,
+ "finds in contents not managed by git",
+ PARSE_OPT_NOARG | PARSE_OPT_NEGHELP },
OPT_GROUP(""),
OPT_BOOLEAN('v', "invert-match", &opt.invert,
"show non-matching lines"),