aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fsck-cache.c2
-rw-r--r--receive-pack.c2
-rw-r--r--upload-pack.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index ca24a1b84..e53d01a40 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -454,7 +454,7 @@ int main(int argc, char **argv)
if (standalone && check_full)
die("Only one of --standalone or --full can be used.");
if (standalone)
- unsetenv("GIT_ALTERNATE_OBJECT_DIRECTORIES");
+ putenv("GIT_ALTERNATE_OBJECT_DIRECTORIES=");
fsck_head_link();
fsck_object_dir(get_object_directory());
diff --git a/receive-pack.c b/receive-pack.c
index 3a1b2ab69..1ef0c1393 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -269,7 +269,7 @@ int main(int argc, char **argv)
/* If we have a ".git" directory, chdir to it */
chdir(".git");
- setenv("GIT_DIR", ".", 1);
+ putenv("GIT_DIR=.");
if (access("objects", X_OK) < 0 || access("refs/heads", X_OK) < 0)
die("%s doesn't appear to be a git directory", dir);
diff --git a/upload-pack.c b/upload-pack.c
index 95d381205..da10742c4 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
chdir(".git");
if (access("objects", X_OK) || access("refs", X_OK))
die("git-upload-pack: %s doesn't seem to be a git archive", dir);
- setenv("GIT_DIR", ".", 1);
+ putenv("GIT_DIR=.");
upload_pack();
return 0;
}