MCPcopy Create free account
hub / github.com/git/git / cmd_multi_pack_index_repack

Function cmd_multi_pack_index_repack

builtin/multi-pack-index.c:372–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372static int cmd_multi_pack_index_repack(int argc, const char **argv,
373 const char *prefix,
374 struct repository *repo UNUSED)
375{
376 struct option *options;
377 static struct option builtin_multi_pack_index_repack_options[] = {
378 OPT_UNSIGNED(0, "batch-size", &opts.batch_size,
379 N_("during repack, collect pack-files of smaller size into a batch that is larger than this size")),
380 OPT_END(),
381 };
382 struct odb_source *source;
383
384 options = add_common_options(builtin_multi_pack_index_repack_options);
385
386 trace2_cmd_mode(argv[0]);
387
388 if (isatty(2))
389 opts.flags |= MIDX_PROGRESS;
390 argc = parse_options(argc, argv, prefix,
391 options,
392 builtin_multi_pack_index_repack_usage,
393 0);
394 if (argc)
395 usage_with_options(builtin_multi_pack_index_repack_usage,
396 options);
397 source = handle_object_dir_option(the_repository);
398
399 FREE_AND_NULL(options);
400
401 return midx_repack(source, (size_t)opts.batch_size, opts.flags);
402}
403
404int cmd_multi_pack_index(int argc,
405 const char **argv,

Callers

nothing calls this directly

Calls 5

parse_optionsFunction · 0.85
usage_with_optionsFunction · 0.85
handle_object_dir_optionFunction · 0.85
midx_repackFunction · 0.85
add_common_optionsFunction · 0.70

Tested by

no test coverage detected