[PATCH] Provide access to git_dir through get_git_dir().

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Sven Verdoolaege
2005-09-26 22:54:01 +02:00
committed by Junio C Hamano
parent edde7a8b53
commit 5da1606d0b
4 changed files with 10 additions and 7 deletions

4
path.c
View File

@ -41,12 +41,10 @@ char *mkpath(const char *fmt, ...)
char *git_path(const char *fmt, ...)
{
const char *git_dir;
const char *git_dir = get_git_dir();
va_list args;
unsigned len;
git_dir = getenv(GIT_DIR_ENVIRONMENT);
if (!git_dir) git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
len = strlen(git_dir);
if (len > PATH_MAX-100)
return bad_path;