4 #include "parse-options.h"
7 static char const * const builtin_multi_pack_index_usage
[] = {
8 N_("git multi-pack-index [--object-dir=<dir>] write"),
12 static struct opts_multi_pack_index
{
13 const char *object_dir
;
16 int cmd_multi_pack_index(int argc
, const char **argv
,
19 static struct option builtin_multi_pack_index_options
[] = {
20 OPT_FILENAME(0, "object-dir", &opts
.object_dir
,
21 N_("object directory containing set of packfile and pack-index pairs")),
25 git_config(git_default_config
, NULL
);
27 argc
= parse_options(argc
, argv
, prefix
,
28 builtin_multi_pack_index_options
,
29 builtin_multi_pack_index_usage
, 0);
32 opts
.object_dir
= get_object_directory();
35 usage_with_options(builtin_multi_pack_index_usage
,
36 builtin_multi_pack_index_options
);
39 die(_("too many arguments"));
43 if (!strcmp(argv
[0], "write"))
44 return write_midx_file(opts
.object_dir
);
46 die(_("unrecognized verb: %s"), argv
[0]);