summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-03-30 15:03:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-03-30 19:16:56 (GMT)
commit60ca94769ce45161c4bcfb4aa92212585d3da0f6 (patch)
treef33b4feb4c095483ec09147eb20bcb004d97a77a /t
parentb25b727494f4782c7af1db31fdfde1cc9b30f7c4 (diff)
downloadgit-60ca94769ce45161c4bcfb4aa92212585d3da0f6.zip
git-60ca94769ce45161c4bcfb4aa92212585d3da0f6.tar.gz
git-60ca94769ce45161c4bcfb4aa92212585d3da0f6.tar.bz2
builtin/multi-pack-index.c: split sub-commands
Handle sub-commands of the 'git multi-pack-index' builtin (e.g., "write", "repack", etc.) separately from one another. This allows sub-commands with unique options, without forcing cmd_multi_pack_index() to reject invalid combinations itself. This comes at the cost of some duplication and boilerplate. Luckily, the duplication is reduced to a minimum, since common options are shared among sub-commands due to a suggestion by Ævar. (Sub-commands do have to retain the common options, too, since this builtin accepts common options on either side of the sub-command). Roughly speaking, cmd_multi_pack_index() parses options (including common ones), and stops at the first non-option, which is the sub-command. It then dispatches to the appropriate sub-command, which parses the remaining options (also including common options). Unknown options are kept by the sub-commands in order to detect their presence (and complain that too many arguments were given). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions