X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=path.c;h=495d17ca4ca371f4b5bdb6f1f3de9a6a9d84280b;hb=67ffdf4c0af47679b8a4ac2b70e722e2f65fc4f9;hp=142e575e5c293b92ff8a5612c7acc86d050c1119;hpb=c7c81b3a51de2778535c8bb18d42a4bb7dfd57bc;p=git.git diff --git a/path.c b/path.c index 142e575e..495d17ca 100644 --- a/path.c +++ b/path.c @@ -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 = 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;