summaryrefslogtreecommitdiff
path: root/tests/repo/open.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2014-06-20 14:42:16 +0200
committerVicent Marti <tanoku@gmail.com>2014-06-20 14:42:16 +0200
commit28f087c8642ff9c8dd6964e101e6d8539db6281a (patch)
tree3518d1bf420e92c964bed03074575d8a1db88654 /tests/repo/open.c
parent4b0a36e881506a02b43a4ae3c19c93c919b36eeb (diff)
parent1589aa0c4d48fb130d8a5db28c45cd3d173cde6d (diff)
downloadlibgit2-28f087c8642ff9c8dd6964e101e6d8539db6281a.tar.gz
libgit2 v0.21.0v0.21.0
Diffstat (limited to 'tests/repo/open.c')
-rw-r--r--tests/repo/open.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/repo/open.c b/tests/repo/open.c
index 7cfe041c2..637c785d5 100644
--- a/tests/repo/open.c
+++ b/tests/repo/open.c
@@ -1,5 +1,6 @@
#include "clar_libgit2.h"
#include "fileops.h"
+#include "sysdir.h"
#include <ctype.h>
void test_repo_open__cleanup(void)
@@ -101,14 +102,13 @@ void test_repo_open__gitlinked(void)
void test_repo_open__from_git_new_workdir(void)
{
+#ifndef GIT_WIN32
/* The git-new-workdir script that ships with git sets up a bunch of
* symlinks to create a second workdir that shares the object db with
* another checkout. Libgit2 can open a repo that has been configured
* this way.
*/
- cl_git_sandbox_init("empty_standard_repo");
-#ifndef GIT_WIN32
git_repository *repo2;
git_buf link_tgt = GIT_BUF_INIT, link = GIT_BUF_INIT, body = GIT_BUF_INIT;
const char **scan;
@@ -121,6 +121,8 @@ void test_repo_open__from_git_new_workdir(void)
"HEAD", NULL
};
+ cl_git_sandbox_init("empty_standard_repo");
+
cl_git_pass(p_mkdir("alternate", 0777));
cl_git_pass(p_mkdir("alternate/.git", 0777));
@@ -296,7 +298,8 @@ void test_repo_open__no_config(void)
git_config *config;
cl_fixture_sandbox("empty_standard_repo");
- cl_git_pass(cl_rename("empty_standard_repo/.gitted", "empty_standard_repo/.git"));
+ cl_git_pass(cl_rename(
+ "empty_standard_repo/.gitted", "empty_standard_repo/.git"));
/* remove local config */
cl_git_pass(git_futils_rmdir_r(
@@ -323,7 +326,7 @@ void test_repo_open__no_config(void)
git_repository_free(repo);
cl_fixture_cleanup("empty_standard_repo");
- git_futils_dirs_global_shutdown();
+ cl_sandbox_set_search_path_defaults();
}
void test_repo_open__force_bare(void)