summaryrefslogtreecommitdiff
path: root/tests/t16-remotes.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t16-remotes.c')
-rw-r--r--tests/t16-remotes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/t16-remotes.c b/tests/t16-remotes.c
index b76557fb4..af54f297d 100644
--- a/tests/t16-remotes.c
+++ b/tests/t16-remotes.c
@@ -34,7 +34,7 @@ BEGIN_TEST(remotes0, "remote parsing works")
git_config *cfg;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -58,7 +58,7 @@ BEGIN_TEST(refspec0, "remote with refspec works")
const git_refspec *refspec = NULL;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -83,7 +83,7 @@ BEGIN_TEST(refspec1, "remote fnmatch works as expected")
const git_refspec *refspec = NULL;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -109,7 +109,7 @@ BEGIN_TEST(refspec2, "refspec transform")
char ref[1024] = {0};
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));