diff options
Diffstat (limited to 'tests-clar/fetchhead/network.c')
| -rw-r--r-- | tests-clar/fetchhead/network.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests-clar/fetchhead/network.c b/tests-clar/fetchhead/network.c index b0d31c51d..d10c891c6 100644 --- a/tests-clar/fetchhead/network.c +++ b/tests-clar/fetchhead/network.c @@ -10,6 +10,7 @@ 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) @@ -18,14 +19,12 @@ void test_fetchhead_network__initialize(void) 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)); + cl_git_pass(git_remote_new(&g_origin, NULL, "origin", LIVE_REPO_URL, GIT_REMOTE_DEFAULT_FETCH)); } void test_fetchhead_network__cleanup(void) { - git_remote_free(g_options.origin_remote); + git_remote_free(g_origin); } static void cleanup_repository(void *path) @@ -43,7 +42,7 @@ static void fetchhead_test_clone(void) { cl_set_cleanup(&cleanup_repository, "./foo"); - cl_git_pass(git_clone(&g_options)); + cl_git_pass(git_clone(&g_repo, g_origin, "./foo", &g_options)); } static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fetchhead) |
