parse-options: let OPT__FORCE take optional flags argument
--force option is most likely hidden from command line completion for safety reasons. This is done by adding an extra flag PARSE_OPT_NOCOMPLETE. Update OPT__FORCE() to accept additional flags. Actual flag change comes later depending on individual commands. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
2de37349d9
commit
1224781d60
@ -242,7 +242,7 @@ static struct option builtin_rm_options[] = {
|
||||
OPT__DRY_RUN(&show_only, N_("dry run")),
|
||||
OPT__QUIET(&quiet, N_("do not list removed files")),
|
||||
OPT_BOOL( 0 , "cached", &index_only, N_("only remove from the index")),
|
||||
OPT__FORCE(&force, N_("override the up-to-date check")),
|
||||
OPT__FORCE(&force, N_("override the up-to-date check"), 0),
|
||||
OPT_BOOL('r', NULL, &recursive, N_("allow recursive removal")),
|
||||
OPT_BOOL( 0 , "ignore-unmatch", &ignore_unmatch,
|
||||
N_("exit with a zero status even if nothing matched")),
|
||||
|
Reference in New Issue
Block a user