parse-options: remove PARSE_OPT_NEGHELP
PARSE_OPT_NEGHELP is confusing because short options defined with that flag do the opposite of what the helptext says. It is also not needed anymore now that options starting with no- can be negated by removing that prefix. Convert its only two users to OPT_NEGBIT() and OPT_BOOL() and then remove support for PARSE_OPT_NEGHELP. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
0f1930c587
commit
cbb08c2e0b
@ -777,8 +777,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"),
|
||||
OPT_BOOLEAN(0, "index", &use_index,
|
||||
"--no-index finds in contents not managed by git"),
|
||||
OPT_NEGBIT(0, "no-index", &use_index,
|
||||
"finds in contents not managed by git", 1),
|
||||
OPT_GROUP(""),
|
||||
OPT_BOOLEAN('v', "invert-match", &opt.invert,
|
||||
"show non-matching lines"),
|
||||
|
Reference in New Issue
Block a user