| 1702 | } |
| 1703 | |
| 1704 | static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args, |
| 1705 | int fd[2], |
| 1706 | const struct ref *orig_ref, |
| 1707 | struct ref **sought, int nr_sought, |
| 1708 | struct oid_array *shallows, |
| 1709 | struct shallow_info *si, |
| 1710 | struct string_list *pack_lockfiles) |
| 1711 | { |
| 1712 | struct repository *r = the_repository; |
| 1713 | struct fsck_options fsck_options; |
| 1714 | struct ref *ref = copy_ref_list(orig_ref); |
| 1715 | enum fetch_state state = FETCH_CHECK_LOCAL; |
| 1716 | struct oidset common = OIDSET_INIT; |
| 1717 | struct oidset negotiation_include_oids = OIDSET_INIT; |
| 1718 | struct packet_reader reader; |
| 1719 | int in_vain = 0, negotiation_started = 0; |
| 1720 | int negotiation_round = 0; |
| 1721 | int haves_to_send = INITIAL_FLUSH; |
| 1722 | struct fetch_negotiator negotiator_alloc; |
| 1723 | struct fetch_negotiator *negotiator; |
| 1724 | int seen_ack = 0; |
| 1725 | struct object_id common_oid; |
| 1726 | int received_ready = 0; |
| 1727 | struct string_list packfile_uris = STRING_LIST_INIT_DUP; |
| 1728 | int i; |
| 1729 | struct strvec index_pack_args = STRVEC_INIT; |
| 1730 | const char *promisor_remote_config; |
| 1731 | |
| 1732 | fsck_options_init(&fsck_options, the_repository, FSCK_OPTIONS_MISSING_GITMODULES); |
| 1733 | |
| 1734 | if (server_feature_v2("promisor-remote", &promisor_remote_config)) |
| 1735 | promisor_remote_reply(promisor_remote_config, NULL); |
| 1736 | |
| 1737 | if (args->filter_options.choice == LOFC_AUTO) { |
| 1738 | struct strbuf errbuf = STRBUF_INIT; |
| 1739 | char *constructed_filter = promisor_remote_construct_filter(r); |
| 1740 | |
| 1741 | list_objects_filter_release(&args->filter_options); |
| 1742 | /* Disallow 'auto' as a result of the resolution of this 'auto' filter below */ |
| 1743 | args->filter_options.allow_auto_filter = 0; |
| 1744 | |
| 1745 | if (constructed_filter && |
| 1746 | gently_parse_list_objects_filter(&args->filter_options, |
| 1747 | constructed_filter, |
| 1748 | &errbuf)) |
| 1749 | die(_("couldn't resolve 'auto' filter '%s': %s"), |
| 1750 | constructed_filter, errbuf.buf); |
| 1751 | |
| 1752 | free(constructed_filter); |
| 1753 | strbuf_release(&errbuf); |
| 1754 | } |
| 1755 | |
| 1756 | negotiator = &negotiator_alloc; |
| 1757 | if (args->refetch) |
| 1758 | fetch_negotiator_init_noop(negotiator); |
| 1759 | else |
| 1760 | fetch_negotiator_init(r, negotiator); |
| 1761 |
no test coverage detected