summaryrefslogtreecommitdiff
path: root/builtin/worktree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-08 06:59:24 (GMT)
commit90186fa0579e4dcdde08a2d823d9b269578d5a70 (patch)
treea6ccdb04314c69aa552b008d1b8707f74f327b99 /builtin/worktree.c
parent535cfa32d775b72dcbc282f31a53ef0090146781 (diff)
parentd228eea5146540b09376f90e2b805553cdc78590 (diff)
downloadgit-90186fa0579e4dcdde08a2d823d9b269578d5a70.zip
git-90186fa0579e4dcdde08a2d823d9b269578d5a70.tar.gz
git-90186fa0579e4dcdde08a2d823d9b269578d5a70.tar.bz2
Merge branch 'sb/worktree-remove-opt-force'
"git worktree remove" learned that "-f" is a shorthand for "--force" option, just like for "git worktree add". * sb/worktree-remove-opt-force: worktree: accept -f as short for --force for removal
Diffstat (limited to 'builtin/worktree.c')
-rw-r--r--builtin/worktree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 40a438e..30647b3 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -783,8 +783,9 @@ static int remove_worktree(int ac, const char **av, const char *prefix)
{
int force = 0;
struct option options[] = {
- OPT_BOOL(0, "force", &force,
- N_("force removing even if the worktree is dirty")),
+ OPT__FORCE(&force,
+ N_("force removing even if the worktree is dirty"),
+ PARSE_OPT_NOCOMPLETE),
OPT_END()
};
struct worktree **worktrees, *wt;