summaryrefslogtreecommitdiff
path: root/builtin/checkout-index.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/checkout-index.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/checkout-index.c')
-rw-r--r--builtin/checkout-index.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 7ba09130cc..91fb9bfc62 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -217,8 +217,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
struct option builtin_checkout_index_options[] = {
OPT_BOOLEAN('a', "all", &all,
"checks out all files in the index"),
- OPT_BOOLEAN('f', "force", &force,
- "forces overwrite of existing files"),
+ OPT__FORCE(&force, "forces overwrite of existing files"),
OPT__QUIET(&quiet, "be quiet"),
OPT_BOOLEAN('n', "no-create", &not_new,
"don't checkout new files"),