| 488 | } |
| 489 | |
| 490 | static void send_capabilities(int fd_out, struct packet_reader *reader) |
| 491 | { |
| 492 | const char *hash_name; |
| 493 | const char *promisor_remote_info; |
| 494 | |
| 495 | if (server_supports_v2("agent")) |
| 496 | packet_write_fmt(fd_out, "agent=%s", git_user_agent_sanitized()); |
| 497 | |
| 498 | if (server_feature_v2("object-format", &hash_name)) { |
| 499 | int hash_algo = hash_algo_by_name(hash_name); |
| 500 | if (hash_algo == GIT_HASH_UNKNOWN) |
| 501 | die(_("unknown object format '%s' specified by server"), hash_name); |
| 502 | reader->hash_algo = &hash_algos[hash_algo]; |
| 503 | packet_write_fmt(fd_out, "object-format=%s", reader->hash_algo->name); |
| 504 | } else { |
| 505 | reader->hash_algo = &hash_algos[GIT_HASH_SHA1_LEGACY]; |
| 506 | } |
| 507 | if (server_feature_v2("promisor-remote", &promisor_remote_info)) { |
| 508 | char *reply; |
| 509 | promisor_remote_reply(promisor_remote_info, &reply); |
| 510 | if (reply) { |
| 511 | packet_write_fmt(fd_out, "promisor-remote=%s", reply); |
| 512 | free(reply); |
| 513 | } |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | int get_remote_bundle_uri(int fd_out, struct packet_reader *reader, |
| 518 | struct bundle_list *bundles, int stateless_rpc) |
no test coverage detected