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
@ -391,7 +391,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||
N_("how to strip spaces and #comments from message")),
|
||||
OPT_STRING('u', "local-user", &keyid, N_("key-id"),
|
||||
N_("use another key to sign the tag")),
|
||||
OPT__FORCE(&force, N_("replace the tag if exists")),
|
||||
OPT__FORCE(&force, N_("replace the tag if exists"), 0),
|
||||
OPT_BOOL(0, "create-reflog", &create_reflog, N_("create a reflog")),
|
||||
|
||||
OPT_GROUP(N_("Tag listing options")),
|
||||
|
Reference in New Issue
Block a user