diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-02-09 18:01:42 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 10:24:50 -0800 |
commit | 1224781d6080b8b69a81526ee23b22a1587920ea (patch) | |
tree | 8b31c3cc26307351710d01d6b797d77101bb97b8 /builtin/notes.c | |
parent | parse-options: add OPT_xxx_F() variants (diff) | |
download | tgif-1224781d6080b8b69a81526ee23b22a1587920ea.tar.xz |
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>
Diffstat (limited to 'builtin/notes.c')
-rw-r--r-- | builtin/notes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/notes.c b/builtin/notes.c index 7c81761645..b52e71c73e 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -413,7 +413,7 @@ static int add(int argc, const char **argv, const char *prefix) parse_reuse_arg}, OPT_BOOL(0, "allow-empty", &allow_empty, N_("allow storing empty note")), - OPT__FORCE(&force, N_("replace existing notes")), + OPT__FORCE(&force, N_("replace existing notes"), 0), OPT_END() }; @@ -484,7 +484,7 @@ static int copy(int argc, const char **argv, const char *prefix) struct notes_tree *t; const char *rewrite_cmd = NULL; struct option options[] = { - OPT__FORCE(&force, N_("replace existing notes")), + OPT__FORCE(&force, N_("replace existing notes"), 0), OPT_BOOL(0, "stdin", &from_stdin, N_("read objects from stdin")), OPT_STRING(0, "for-rewrite", &rewrite_cmd, N_("command"), N_("load rewriting config for <command> (implies " |