summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-29 06:03:23 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-29 06:03:23 (GMT)
commit8c1f5f0f1f9c36ef5465512753efeff36758ba7d (patch)
treee27706307f48a9e5192f0b6bb873ecadf41dbed5 /path.c
parent933693da77857b12ba86d999a601dbdb8ab212ff (diff)
parent10d781b9caa4f71495c7b34963bef137216f86a8 (diff)
downloadgit-8c1f5f0f1f9c36ef5465512753efeff36758ba7d.zip
git-8c1f5f0f1f9c36ef5465512753efeff36758ba7d.tar.gz
git-8c1f5f0f1f9c36ef5465512753efeff36758ba7d.tar.bz2
Merge refs/heads/master from .
Diffstat (limited to 'path.c')
-rw-r--r--path.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/path.c b/path.c
index b85f087..142e575 100644
--- a/path.c
+++ b/path.c
@@ -41,10 +41,12 @@ char *mkpath(const char *fmt, ...)
char *git_path(const char *fmt, ...)
{
- const char *git_dir = gitenv(GIT_DIR_ENVIRONMENT) ? : DEFAULT_GIT_DIR_ENVIRONMENT;
+ const char *git_dir;
va_list args;
unsigned len;
+ git_dir = gitenv(GIT_DIR_ENVIRONMENT);
+ if (!git_dir) git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
len = strlen(git_dir);
if (len > PATH_MAX-100)
return bad_path;