]> git.ipfire.org Git - thirdparty/git.git/commit - git.c
builtin/worktree.c: let parse-options parse subcommands
authorSZEDER Gábor <szeder.dev@gmail.com>
Fri, 19 Aug 2022 16:04:11 +0000 (18:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Aug 2022 18:13:16 +0000 (11:13 -0700)
commit398c4ff582646b099eb1f3b14a525dfe5eeb5420
treee9692a4606da5272aab72f4155788e108763eb14
parent2b057d97d796d9192ec899a2109924cabba23ba6
builtin/worktree.c: let parse-options parse subcommands

'git worktree' parses its subcommands with a long list of if
statements.  parse-options has just learned to parse subcommands, so
let's use that facility instead, with the benefits of shorter code,
handling missing or unknown subcommands, and listing subcommands for
Bash completion.

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