4 #include "parse-options.h"
8 static char const * const builtin_multi_pack_index_usage
[] = {
9 N_("git multi-pack-index [--object-dir=<dir>] (write|verify)"),
13 static struct opts_multi_pack_index
{
14 const char *object_dir
;
17 int cmd_multi_pack_index(int argc
, const char **argv
,
20 static struct option builtin_multi_pack_index_options
[] = {
21 OPT_FILENAME(0, "object-dir", &opts
.object_dir
,
22 N_("object directory containing set of packfile and pack-index pairs")),
26 git_config(git_default_config
, NULL
);
28 argc
= parse_options(argc
, argv
, prefix
,
29 builtin_multi_pack_index_options
,
30 builtin_multi_pack_index_usage
, 0);
33 opts
.object_dir
= get_object_directory();
36 usage_with_options(builtin_multi_pack_index_usage
,
37 builtin_multi_pack_index_options
);
40 die(_("too many arguments"));
44 trace2_cmd_mode(argv
[0]);
46 if (!strcmp(argv
[0], "write"))
47 return write_midx_file(opts
.object_dir
);
48 if (!strcmp(argv
[0], "verify"))
49 return verify_midx_file(the_repository
, opts
.object_dir
);
51 die(_("unrecognized verb: %s"), argv
[0]);