#include "cache.h"
#include "config.h"
#include "parse-options.h"
+#include "midx.h"
static char const * const builtin_multi_pack_index_usage[] = {
- N_("git multi-pack-index [--object-dir=<dir>]"),
+ N_("git multi-pack-index [--object-dir=<dir>] (write|verify)"),
NULL
};
if (!opts.object_dir)
opts.object_dir = get_object_directory();
- return 0;
+ if (argc == 0)
+ usage_with_options(builtin_multi_pack_index_usage,
+ builtin_multi_pack_index_options);
+
+ if (argc > 1) {
+ die(_("too many arguments"));
+ return 1;
+ }
+
+ if (!strcmp(argv[0], "write"))
+ return write_midx_file(opts.object_dir);
+ if (!strcmp(argv[0], "verify"))
+ return verify_midx_file(opts.object_dir);
+
+ die(_("unrecognized verb: %s"), argv[0]);
}