diff options
author | Ben Straub <bs@github.com> | 2012-12-13 07:48:44 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2012-12-13 07:48:44 +0400 |
commit | 44f36f6e3ba40420d0a8bb2977e6ada2b735bc2b (patch) | |
tree | e876bd92421c8235ee198dd62553042b0de4761e /tests-clar/fetchhead | |
parent | b914e17d8268f836bcd8b785781ed24cbec1c29f (diff) |
Convert clone to use dangling remotes
Diffstat (limited to 'tests-clar/fetchhead')
-rw-r--r-- | tests-clar/fetchhead/network.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests-clar/fetchhead/network.c b/tests-clar/fetchhead/network.c index 46cb977e0..0eeac9ed2 100644 --- a/tests-clar/fetchhead/network.c +++ b/tests-clar/fetchhead/network.c @@ -10,10 +10,17 @@ CL_IN_CATEGORY("network") #define LIVE_REPO_URL "git://github.com/libgit2/TestGitRepository" static git_repository *g_repo; +static git_remote *g_origin; void test_fetchhead_network__initialize(void) { g_repo = NULL; + cl_git_pass(git_remote_new(&g_origin, NULL, "origin", LIVE_REPO_URL, "")); +} + +void test_fetchhead_network__cleanup(void) +{ + g_origin = NULL; } static void cleanup_repository(void *path) @@ -31,7 +38,7 @@ static void fetchhead_test_clone(void) { cl_set_cleanup(&cleanup_repository, "./test1"); - cl_git_pass(git_clone(&g_repo, LIVE_REPO_URL, "./test1", NULL, NULL, NULL)); + cl_git_pass(git_clone(&g_repo, g_origin, "./test1", NULL, NULL, NULL)); } static void fetchhead_test_fetch(const char *fetchspec, const char *expected_fetchhead) |