summaryrefslogtreecommitdiff
path: root/tests-clar/clone
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-26 12:58:44 -0700
committerBen Straub <bstraub@github.com>2012-07-26 12:58:44 -0700
commitef9905c9902a9ffad71c8acddec74dc0d8e866de (patch)
tree430227357c229d559571d65a9d2d008252b4ae64 /tests-clar/clone
parentdc03369c07c6222c763cca8a80452608c8cce435 (diff)
downloadlibgit2-ef9905c9902a9ffad71c8acddec74dc0d8e866de.tar.gz
checkout: introduce git_checkout_opts
Refactor checkout into several more-sensible entry points, which consolidates common options into a single structure that may be passed around.
Diffstat (limited to 'tests-clar/clone')
-rw-r--r--tests-clar/clone/clone.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests-clar/clone/clone.c b/tests-clar/clone/clone.c
index 3fba91ca..a64d5e83 100644
--- a/tests-clar/clone/clone.c
+++ b/tests-clar/clone/clone.c
@@ -3,8 +3,8 @@
#include "git2/clone.h"
#include "repository.h"
-#define DO_LIVE_NETWORK_TESTS 0
#define DO_LOCAL_TEST 0
+#define DO_LIVE_NETWORK_TESTS 1
#define LIVE_REPO_URL "http://github.com/libgit2/node-gitteh"
@@ -67,7 +67,7 @@ static void build_local_file_url(git_buf *out, const char *fixture)
void test_clone_clone__bad_url(void)
{
/* Clone should clean up the mess if the URL isn't a git repository */
- cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", NULL));
+ cl_git_fail(git_clone(&g_repo, "not_a_repo", "./foo", NULL, NULL));
cl_assert(!git_path_exists("./foo"));
cl_git_fail(git_clone_bare(&g_repo, "not_a_repo", "./foo.git", NULL));
cl_assert(!git_path_exists("./foo.git"));
@@ -80,7 +80,7 @@ void test_clone_clone__local(void)
build_local_file_url(&src, cl_fixture("testrepo.git"));
#if DO_LOCAL_TEST
- cl_git_pass(git_clone(&g_repo, git_buf_cstr(&src), "./local", NULL));
+ cl_git_pass(git_clone(&g_repo, git_buf_cstr(&src), "./local", NULL, NULL));
git_repository_free(g_repo);
git_futils_rmdir_r("./local", GIT_DIRREMOVAL_FILES_AND_DIRS);
cl_git_pass(git_clone_bare(&g_repo, git_buf_cstr(&src), "./local.git", NULL));
@@ -96,7 +96,7 @@ void test_clone_clone__network_full(void)
#if DO_LIVE_NETWORK_TESTS
git_remote *origin;
- cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./test2", NULL));
+ cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./test2", NULL, NULL));
cl_assert(!git_repository_is_bare(g_repo));
cl_git_pass(git_remote_load(&origin, g_repo, "origin"));
git_futils_rmdir_r("./test2", GIT_DIRREMOVAL_FILES_AND_DIRS);
@@ -121,19 +121,19 @@ void test_clone_clone__already_exists(void)
#if DO_LIVE_NETWORK_TESTS
/* Should pass with existing-but-empty dir */
p_mkdir("./foo", GIT_DIR_MODE);
- cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL));
+ cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL, NULL));
git_repository_free(g_repo); g_repo = NULL;
git_futils_rmdir_r("./foo", GIT_DIRREMOVAL_FILES_AND_DIRS);
#endif
/* Should fail with a file */
cl_git_mkfile("./foo", "Bar!");
- cl_git_fail(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL));
+ cl_git_fail(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL, NULL));
git_futils_rmdir_r("./foo", GIT_DIRREMOVAL_FILES_AND_DIRS);
/* Should fail with existing-and-nonempty dir */
p_mkdir("./foo", GIT_DIR_MODE);
cl_git_mkfile("./foo/bar", "Baz!");
- cl_git_fail(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL));
+ cl_git_fail(git_clone(&g_repo, LIVE_REPO_URL, "./foo", NULL, NULL));
git_futils_rmdir_r("./foo", GIT_DIRREMOVAL_FILES_AND_DIRS);
}