diff options
author | Ben Straub <bs@github.com> | 2012-12-15 01:03:59 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-12-15 01:03:59 +0400 |
commit | 18b2d560d376da8bcb601603346b871c05958772 (patch) | |
tree | 72776fc9332318c5157ca2e82bd6baa9906a091d /tests-clar/fetchhead | |
parent | 7e610440194615fe5970f5f15266893f02a7f6aa (diff) |
Deploy git_clone_options; remove git_clone_bare
Diffstat (limited to 'tests-clar/fetchhead')
-rw-r--r-- | tests-clar/fetchhead/network.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests-clar/fetchhead/network.c b/tests-clar/fetchhead/network.c index aed5b5ad8..b0d31c51d 100644 --- a/tests-clar/fetchhead/network.c +++ b/tests-clar/fetchhead/network.c @@ -10,17 +10,22 @@ CL_IN_CATEGORY("network") #define LIVE_REPO_URL "git://github.com/libgit2/TestGitRepository" static git_repository *g_repo; -static git_remote *g_origin; +static git_clone_options g_options; void test_fetchhead_network__initialize(void) { g_repo = NULL; - cl_git_pass(git_remote_new(&g_origin, NULL, "origin", LIVE_REPO_URL, GIT_REMOTE_DEFAULT_FETCH)); + + memset(&g_options, 0, sizeof(git_clone_options)); + g_options.version = GIT_CLONE_OPTIONS_VERSION; + g_options.out = &g_repo; + g_options.local_path = "./foo"; + cl_git_pass(git_remote_new(&g_options.origin_remote, NULL, "origin", LIVE_REPO_URL, GIT_REMOTE_DEFAULT_FETCH)); } void test_fetchhead_network__cleanup(void) { - g_origin = NULL; + git_remote_free(g_options.origin_remote); } static void cleanup_repository(void *path) @@ -36,9 +41,9 @@ static void cleanup_repository(void *path) static void fetchhead_test_clone(void) { - cl_set_cleanup(&cleanup_repository, "./test1"); + cl_set_cleanup(&cleanup_repository, "./foo"); - cl_git_pass(git_clone(&g_repo, g_origin, "./test1", NULL, NULL, NULL)); + cl_git_pass(git_clone(&g_options)); } static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fetchhead) |