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
@ -193,7 +193,7 @@ static struct option pull_options[] = {
|
||||
OPT_PASSTHRU(0, "upload-pack", &opt_upload_pack, N_("path"),
|
||||
N_("path to upload pack on remote end"),
|
||||
0),
|
||||
OPT__FORCE(&opt_force, N_("force overwrite of local branch")),
|
||||
OPT__FORCE(&opt_force, N_("force overwrite of local branch"), 0),
|
||||
OPT_PASSTHRU('t', "tags", &opt_tags, NULL,
|
||||
N_("fetch all tags and associated objects"),
|
||||
PARSE_OPT_NOARG),
|
||||
|
||||
Reference in New Issue
Block a user