completion: simplify completing 'git worktree' subcommands and options
authorSZEDER Gábor <szeder.dev@gmail.com>
Thu, 19 Dec 2019 15:09:19 +0000 (16:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 22:06:13 +0000 (14:06 -0800)
commit3c86f6cde85216808cddce9d4947de53d590474c
treea6493f50d750770cc546c8f2d9bb5c6cda56f8f8
parent367efd54b34883889068255c370a4b9f079cec2d
completion: simplify completing 'git worktree' subcommands and options

The completion function for 'git worktree' uses separate but very
similar case arms to complete --options for each subcommand.

Combine these into a single case arm to avoid repetition.

Note that after this change we won't complete 'git worktree remove's
'--force' option, but that is consistent with our general stance on
not offering '--force', as it should be used with care.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash