Commit 94161115 by Ben Straub

Clone: minor cleanup and whitespace.

parent af58ec9e
......@@ -93,7 +93,7 @@ static int update_head_to_new_branch(git_repository *repo, git_oid *target, cons
if (!create_tracking_branch(repo, target, name)) {
git_reference *head;
if (!git_reference_lookup(&head, repo, "HEAD")) {
if (!git_repository_head(&head, repo)) {
git_buf target = GIT_BUF_INIT;
if (!git_buf_printf(&target, "refs/heads/%s", name) &&
!git_reference_set_target(head, git_buf_cstr(&target))) {
......
......@@ -89,9 +89,13 @@ void test_clone_clone__local(void)
void test_clone_clone__network_full(void)
{
#if 0
git_remote *origin;
cl_git_pass(git_clone(&g_repo,
"https://github.com/libgit2/libgit2.git",
"https://github.com/libgit2/GitForDelphi.git",
"./libgit2", NULL));
cl_assert(!git_repository_is_bare(g_repo));
cl_git_pass(git_remote_load(&origin, g_repo, "origin"));
git_futils_rmdir_r("./libgit2", GIT_DIRREMOVAL_FILES_AND_DIRS);
#endif
}
......@@ -99,9 +103,13 @@ void test_clone_clone__network_full(void)
void test_clone_clone__network_bare(void)
{
#if 0
git_remote *origin;
cl_git_pass(git_clone_bare(&g_repo,
"https://github.com/libgit2/libgit2.git",
"https://github.com/libgit2/GitForDelphi.git",
"./libgit2.git", NULL));
cl_assert(git_repository_is_bare(g_repo));
cl_git_pass(git_remote_load(&origin, g_repo, "origin"));
git_futils_rmdir_r("./libgit2.git", GIT_DIRREMOVAL_FILES_AND_DIRS);
#endif
}
......
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