| 186 | } |
| 187 | |
| 188 | static int fetch_refs_from_bundle(struct transport *transport, |
| 189 | int nr_heads UNUSED, |
| 190 | struct ref **to_fetch UNUSED) |
| 191 | { |
| 192 | struct unbundle_opts opts = { |
| 193 | .flags = fetch_pack_fsck_objects() ? VERIFY_BUNDLE_FSCK : 0, |
| 194 | }; |
| 195 | struct bundle_transport_data *data = transport->data; |
| 196 | struct strvec extra_index_pack_args = STRVEC_INIT; |
| 197 | struct strbuf msg_types = STRBUF_INIT; |
| 198 | int ret; |
| 199 | |
| 200 | if (transport->progress) |
| 201 | strvec_push(&extra_index_pack_args, "-v"); |
| 202 | |
| 203 | if (!data->get_refs_from_bundle_called) |
| 204 | get_refs_from_bundle_inner(transport); |
| 205 | |
| 206 | repo_config(the_repository, fetch_fsck_config_cb, &msg_types); |
| 207 | opts.fsck_msg_types = msg_types.buf; |
| 208 | |
| 209 | ret = unbundle(the_repository, &data->header, data->fd, |
| 210 | &extra_index_pack_args, &opts); |
| 211 | data->fd = -1; /* `unbundle()` closes the file descriptor */ |
| 212 | transport->hash_algo = data->header.hash_algo; |
| 213 | |
| 214 | strvec_clear(&extra_index_pack_args); |
| 215 | strbuf_release(&msg_types); |
| 216 | return ret; |
| 217 | } |
| 218 | |
| 219 | static int close_bundle(struct transport *transport) |
| 220 | { |
nothing calls this directly
no test coverage detected