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:
authorSascha Cunz <Sascha@BabbelBox.org>2012-12-19 08:24:23 +0400
committerSascha Cunz <Sascha@BabbelBox.org>2012-12-19 08:24:23 +0400
commit96a289f5f3d2ceeb84ac50216c44107583b48b8d (patch)
tree83f0e36ff1e755f2830f16501f13b532eba83b78 /tests-clar/clone
parent3dc0207bc07b6214d395812c0cef0d785cafa071 (diff)
clone-empty-test: Don't use one pointer for two things
... so we can clean up correctly.
Diffstat (limited to 'tests-clar/clone')
-rw-r--r--tests-clar/clone/empty.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests-clar/clone/empty.c b/tests-clar/clone/empty.c
index 0f0edcb8d..8f2e6ff12 100644
--- a/tests-clar/clone/empty.c
+++ b/tests-clar/clone/empty.c
@@ -6,6 +6,7 @@
static git_clone_options g_options;
static git_remote *g_origin;
static git_repository *g_repo;
+static git_repository *g_repo_cloned;
void test_clone_empty__initialize(void)
{
@@ -29,6 +30,9 @@ void test_clone_empty__cleanup(void)
static void cleanup_repository(void *path)
{
cl_fixture_cleanup((const char *)path);
+
+ git_repository_free(g_repo_cloned);
+ g_repo_cloned = NULL;
}
void test_clone_empty__can_clone_an_empty_local_repo_barely(void)
@@ -40,7 +44,7 @@ void test_clone_empty__can_clone_an_empty_local_repo_barely(void)
cl_git_pass(git_remote_new(&g_origin, NULL, "origin", "./empty_bare.git", GIT_REMOTE_DEFAULT_FETCH));
g_options.bare = true;
- cl_git_pass(git_clone(&g_repo, g_origin, "./empty", &g_options));
+ cl_git_pass(git_clone(&g_repo_cloned, g_origin, "./empty", &g_options));
}
void test_clone_empty__can_clone_an_empty_local_repo(void)
@@ -51,7 +55,7 @@ void test_clone_empty__can_clone_an_empty_local_repo(void)
g_origin = NULL;
cl_git_pass(git_remote_new(&g_origin, NULL, "origin", "./empty_bare.git", GIT_REMOTE_DEFAULT_FETCH));
- cl_git_pass(git_clone(&g_repo, g_origin, "./empty", &g_options));
+ cl_git_pass(git_clone(&g_repo_cloned, g_origin, "./empty", &g_options));
}
void test_clone_empty__can_clone_an_empty_standard_repo(void)
@@ -66,5 +70,5 @@ void test_clone_empty__can_clone_an_empty_standard_repo(void)
cl_set_cleanup(&cleanup_repository, "./empty");
- cl_git_pass(git_clone(&g_repo, g_origin, "./empty", &g_options));
+ cl_git_pass(git_clone(&g_repo_cloned, g_origin, "./empty", &g_options));
}