Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-12-13 07:48:44 +0400
committerBen Straub <bs@github.com>2012-12-13 07:48:44 +0400
commit44f36f6e3ba40420d0a8bb2977e6ada2b735bc2b (patch)
treee876bd92421c8235ee198dd62553042b0de4761e /tests-clar/fetchhead
parentb914e17d8268f836bcd8b785781ed24cbec1c29f (diff)
Convert clone to use dangling remotes
Diffstat (limited to 'tests-clar/fetchhead')
-rw-r--r--tests-clar/fetchhead/network.c9
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)