Commit 8856849c by Russell Belfer

Merge pull request #739 from arthurschreiber/fix_remote_connected

Fix git_remote_connected
parents 1d4dcc4b e9551e86
......@@ -417,6 +417,8 @@ static int git_close(git_transport *transport)
return -1;
}
t->parent.connected = 0;
#ifdef GIT_WIN32
WSACleanup();
#endif
......
......@@ -610,6 +610,8 @@ static int http_close(git_transport *transport)
return -1;
}
t->parent.connected = 0;
return 0;
}
......
......@@ -190,6 +190,7 @@ static int local_close(git_transport *transport)
{
transport_local *t = (transport_local *)transport;
t->parent.connected = 0;
git_repository_free(t->repo);
t->repo = NULL;
......
......@@ -90,6 +90,15 @@ static void connect_to_local_repository(const char *local_repository)
}
void test_network_remotelocal__connected(void)
{
connect_to_local_repository(cl_fixture("testrepo.git"));
cl_assert(git_remote_connected(remote));
git_remote_disconnect(remote);
cl_assert(!git_remote_connected(remote));
}
void test_network_remotelocal__retrieve_advertised_references(void)
{
int how_many_refs = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment