MCPcopy Index your code
hub / github.com/git/git / disconnect_git

Function disconnect_git

transport.c:976–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

974}
975
976static 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
1003static struct transport_vtable taken_over_vtable = {
1004 .get_refs_list = get_refs_via_connect,

Callers

nothing calls this directly

Calls 4

packet_flushFunction · 0.85
finish_connectFunction · 0.85
oid_array_clearFunction · 0.85

Tested by

no test coverage detected