Commit 94412b00 by Carlos Martín Nieto

remote: assert what we want to happen when ther is no default branch

Assert what we already do, so as to notice changes.
parent 26bf3a53
...@@ -48,3 +48,17 @@ void test_network_remote_defaultbranch__master_on_detached(void) ...@@ -48,3 +48,17 @@ void test_network_remote_defaultbranch__master_on_detached(void)
cl_git_pass(git_repository_detach_head(g_repo_a, NULL, NULL)); cl_git_pass(git_repository_detach_head(g_repo_a, NULL, NULL));
assert_default_branch("refs/heads/master"); assert_default_branch("refs/heads/master");
} }
void test_network_remote_defaultbranch__no_default_branch(void)
{
git_remote *remote_b;
const git_remote_head **heads;
size_t len;
cl_git_pass(git_remote_create(&remote_b, g_repo_b, "self", git_repository_path(g_repo_b)));
cl_git_pass(git_remote_connect(remote_b, GIT_DIRECTION_FETCH));
cl_git_pass(git_remote_ls(&heads, &len, remote_b));
cl_assert_equal_i(0, len);
git_remote_free(remote_b);
}
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