diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2022-08-19 18:04:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-19 20:13:16 +0200 |
commit | 398c4ff582646b099eb1f3b14a525dfe5eeb5420 (patch) | |
tree | e9692a4606da5272aab72f4155788e108763eb14 /git.c | |
parent | builtin/stash.c: let parse-options parse subcommands (diff) | |
download | git-398c4ff582646b099eb1f3b14a525dfe5eeb5420.tar.xz git-398c4ff582646b099eb1f3b14a525dfe5eeb5420.zip |
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>
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -627,7 +627,7 @@ static struct cmd_struct commands[] = { { "verify-tag", cmd_verify_tag, RUN_SETUP }, { "version", cmd_version }, { "whatchanged", cmd_whatchanged, RUN_SETUP }, - { "worktree", cmd_worktree, RUN_SETUP | NO_PARSEOPT }, + { "worktree", cmd_worktree, RUN_SETUP }, { "write-tree", cmd_write_tree, RUN_SETUP }, }; |