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
@ -157,7 +157,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
|
||||
struct option builtin_checkout_index_options[] = {
|
||||
OPT_BOOL('a', "all", &all,
|
||||
N_("check out all files in the index")),
|
||||
OPT__FORCE(&force, N_("force overwrite of existing files")),
|
||||
OPT__FORCE(&force, N_("force overwrite of existing files"), 0),
|
||||
OPT__QUIET(&quiet,
|
||||
N_("no warning for existing files and files not in index")),
|
||||
OPT_BOOL('n', "no-create", ¬_new,
|
||||
|
Reference in New Issue
Block a user