| 611 | } |
| 612 | |
| 613 | int cmd_unpack_objects(int argc, |
| 614 | const char **argv, |
| 615 | const char *prefix UNUSED, |
| 616 | struct repository *repo) |
| 617 | { |
| 618 | int i; |
| 619 | struct object_id oid; |
| 620 | struct git_hash_ctx tmp_ctx; |
| 621 | |
| 622 | disable_replace_refs(); |
| 623 | |
| 624 | repo_config(the_repository, git_default_config, NULL); |
| 625 | |
| 626 | quiet = !isatty(2); |
| 627 | |
| 628 | show_usage_if_asked(argc, argv, unpack_usage); |
| 629 | |
| 630 | fsck_options_init(&fsck_options, repo, FSCK_OPTIONS_STRICT); |
| 631 | |
| 632 | for (i = 1 ; i < argc; i++) { |
| 633 | const char *arg = argv[i]; |
| 634 | |
| 635 | if (*arg == '-') { |
| 636 | if (!strcmp(arg, "-n")) { |
| 637 | dry_run = 1; |
| 638 | continue; |
| 639 | } |
| 640 | if (!strcmp(arg, "-q")) { |
| 641 | quiet = 1; |
| 642 | continue; |
| 643 | } |
| 644 | if (!strcmp(arg, "-r")) { |
| 645 | recover = 1; |
| 646 | continue; |
| 647 | } |
| 648 | if (!strcmp(arg, "--strict")) { |
| 649 | strict = 1; |
| 650 | continue; |
| 651 | } |
| 652 | if (skip_prefix(arg, "--strict=", &arg)) { |
| 653 | strict = 1; |
| 654 | fsck_set_msg_types(&fsck_options, arg); |
| 655 | continue; |
| 656 | } |
| 657 | if (skip_prefix(arg, "--pack_header=", &arg)) { |
| 658 | if (parse_pack_header_option(arg, |
| 659 | buffer, &len) < 0) |
| 660 | die(_("bad --pack_header: %s"), arg); |
| 661 | continue; |
| 662 | } |
| 663 | if (skip_prefix(arg, "--max-input-size=", &arg)) { |
| 664 | max_input_size = strtoumax(arg, NULL, 10); |
| 665 | continue; |
| 666 | } |
| 667 | usage(unpack_usage); |
| 668 | } |
| 669 | |
| 670 | /* We don't take any non-flag arguments now.. Maybe some day */ |
nothing calls this directly
no test coverage detected