summaryrefslogtreecommitdiff
path: root/builtin/notes.c
diff options
context:
space:
mode:
authorLibravatar René Scharfe <rene.scharfe@lsrfire.ath.cx>2010-11-08 19:01:54 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-11-15 10:04:43 -0800
commit76946b76fe3d26507d61cae97aa0676fad24ed92 (patch)
treecb637a3012a3b7f5f448ff660106ba1e2595da09 /builtin/notes.c
parentadd description parameter to OPT__QUIET (diff)
downloadtgif-76946b76fe3d26507d61cae97aa0676fad24ed92.tar.xz
add OPT__FORCE
Add OPT__FORCE as a helper macro in the same spirit as OPT__VERBOSE et.al. to simplify defining -f/--force options. Signed-off-by: Rene Scharfe <rene.scharfe@lstfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/notes.c')
-rw-r--r--builtin/notes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/notes.c b/builtin/notes.c
index 2ab070fa09..c85cbf5a47 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -538,7 +538,7 @@ static int add(int argc, const char **argv, const char *prefix)
{ OPTION_CALLBACK, 'C', "reuse-message", &msg, "OBJECT",
"reuse specified note object", PARSE_OPT_NONEG,
parse_reuse_arg},
- OPT_BOOLEAN('f', "force", &force, "replace existing notes"),
+ OPT__FORCE(&force, "replace existing notes"),
OPT_END()
};
@@ -594,7 +594,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_BOOLEAN('f', "force", &force, "replace existing notes"),
+ OPT__FORCE(&force, "replace existing notes"),
OPT_BOOLEAN(0, "stdin", &from_stdin, "read objects from stdin"),
OPT_STRING(0, "for-rewrite", &rewrite_cmd, "command",
"load rewriting config for <command> (implies "