summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2022-08-19 18:04:09 +0200
committerJunio C Hamano <gitster@pobox.com>2022-08-19 11:13:16 -0700
commit1c3502b198a211031619ce22870490b1498c15dd (patch)
tree220e4fdb4b630e1a43b86fda3214d8018c7d7cdd /builtin/commit-graph.c
parentb26a412f1e96e40c419001991486cced837679a6 (diff)
builtin/sparse-checkout.c: let parse-options parse subcommands
'git sparse-checkout' parses its subcommands with a couple 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. Note that some of the functions implementing each subcommand only accept the 'argc' and '**argv' parameters, so add a (unused) '*prefix' parameter to make them match the type expected by parse-options, and thus avoid casting function pointers. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions