summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3cd6ecd)
raw | patch | inline | side by side (parent: 3cd6ecd)
author | Jason Riedy <ejr@cs.berkeley.edu> | |
Tue, 23 Aug 2005 20:52:01 +0000 (13:52 -0700) | ||
committer | Jason Riedy <ejr@cs.berkeley.edu> | |
Wed, 24 Aug 2005 03:41:12 +0000 (20:41 -0700) |
Solaris 8 doesn't have the newer unsetenv() and setenv()
functions, so replace them with putenv(). The one use of
unsetenv() in fsck-cache.c now sets GIT_ALTERNATE_OBJECT_
DIRECTORIES to the empty string. Every place that var
is used, NULLs are also replaced with empty strings, so
it's ok.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
functions, so replace them with putenv(). The one use of
unsetenv() in fsck-cache.c now sets GIT_ALTERNATE_OBJECT_
DIRECTORIES to the empty string. Every place that var
is used, NULLs are also replaced with empty strings, so
it's ok.
Signed-off-by: Jason Riedy <ejr@cs.berkeley.edu>
fsck-cache.c | patch | blob | history | |
receive-pack.c | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/fsck-cache.c b/fsck-cache.c
index ca24a1b8449d71195a0e798bce4ec27167bf0aac..e53d01a40ffd98f1cb3a571776b0e050551938f1 100644 (file)
--- a/fsck-cache.c
+++ b/fsck-cache.c
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 3a1b2ab694bf61a25b926caa8b2a00e00fabb5d9..1ef0c13935751903efc5c2dee738604a80b75de2 100644 (file)
--- a/receive-pack.c
+++ b/receive-pack.c
/* 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 95d38120517e31f9c539daeaaec0b75da25f1e82..da10742c44201cfb6f86eb8d80f3be27940335ff 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
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;
}