| 400 | } |
| 401 | |
| 402 | static int get_bundle_uri(struct transport *transport) |
| 403 | { |
| 404 | struct git_transport_data *data = transport->data; |
| 405 | struct packet_reader reader; |
| 406 | int stateless_rpc = transport->stateless_rpc; |
| 407 | |
| 408 | if (!transport->bundles) { |
| 409 | CALLOC_ARRAY(transport->bundles, 1); |
| 410 | init_bundle_list(transport->bundles); |
| 411 | } |
| 412 | |
| 413 | if (!data->finished_handshake) { |
| 414 | struct ref *refs = handshake(transport, 0, NULL, 0); |
| 415 | |
| 416 | if (refs) |
| 417 | free_refs(refs); |
| 418 | } |
| 419 | |
| 420 | /* |
| 421 | * "Support" protocol v0 and v2 without bundle-uri support by |
| 422 | * silently degrading to a NOOP. |
| 423 | */ |
| 424 | if (!server_supports_v2("bundle-uri")) |
| 425 | return 0; |
| 426 | |
| 427 | packet_reader_init(&reader, data->fd[0], NULL, 0, |
| 428 | PACKET_READ_CHOMP_NEWLINE | |
| 429 | PACKET_READ_GENTLE_ON_EOF); |
| 430 | |
| 431 | return get_remote_bundle_uri(data->fd[1], &reader, |
| 432 | transport->bundles, stateless_rpc); |
| 433 | } |
| 434 | |
| 435 | static int fetch_refs_via_pack(struct transport *transport, |
| 436 | int nr_heads, struct ref **to_fetch) |
nothing calls this directly
no test coverage detected