| 974 | } |
| 975 | |
| 976 | static int disconnect_git(struct transport *transport) |
| 977 | { |
| 978 | struct git_transport_data *data = transport->data; |
| 979 | if (data->conn) { |
| 980 | if (data->finished_handshake && !transport->stateless_rpc) |
| 981 | packet_flush(data->fd[1]); |
| 982 | close(data->fd[0]); |
| 983 | if (data->fd[1] >= 0) |
| 984 | close(data->fd[1]); |
| 985 | finish_connect(data->conn); |
| 986 | } |
| 987 | |
| 988 | if (data->options.negotiation_restrict_tips) { |
| 989 | oid_array_clear(data->options.negotiation_restrict_tips); |
| 990 | free(data->options.negotiation_restrict_tips); |
| 991 | } |
| 992 | if (data->options.negotiation_include_tips) { |
| 993 | oid_array_clear(data->options.negotiation_include_tips); |
| 994 | free(data->options.negotiation_include_tips); |
| 995 | } |
| 996 | list_objects_filter_release(&data->options.filter_options); |
| 997 | oid_array_clear(&data->extra_have); |
| 998 | oid_array_clear(&data->shallow); |
| 999 | free(data); |
| 1000 | return 0; |
| 1001 | } |
| 1002 | |
| 1003 | static struct transport_vtable taken_over_vtable = { |
| 1004 | .get_refs_list = get_refs_via_connect, |
nothing calls this directly
no test coverage detected