]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/worktree.c
worktree: accept -f as short for --force for removal
authorStefan Beller <sbeller@google.com>
Tue, 17 Apr 2018 18:19:39 +0000 (11:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 Apr 2018 00:19:05 +0000 (09:19 +0900)
commitd228eea5146540b09376f90e2b805553cdc78590
tree2d2f023ded0e655b1be1361eca0809af864abd93
parent468165c1d8a442994a825f3684528361727cd8c0
worktree: accept -f as short for --force for removal

Many commands support a "--force" option, frequently abbreviated as
"-f", however, "git worktree remove"'s hand-rolled OPT_BOOL forgets
to recognize the short form, despite git-worktree.txt documenting
"-f" as supported. Replace OPT_BOOL with OPT__FORCE, which provides
"-f" for free, and makes 'remove' consistent with 'add' option
parsing (which also specifies the PARSE_OPT_NOCOMPLETE flag).

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c