diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-10 16:12:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-10 16:12:51 -0800 |
commit | af41867169c6350e2e73a1bfd8f3f2dd5a17bba6 (patch) | |
tree | 25c9780c08b03b5e495e6f0b862d694b8f561d11 | |
parent | Add --force to git-send-email documentation (diff) | |
parent | setup: make sure git_dir path is in a permanent buffer, getenv(3) case (diff) | |
download | tgif-af41867169c6350e2e73a1bfd8f3f2dd5a17bba6.tar.xz |
Merge branch 'ks/maint-getenv-fix' into maint
* ks/maint-getenv-fix:
setup: make sure git_dir path is in a permanent buffer, getenv(3) case
-rw-r--r-- | environment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/environment.c b/environment.c index de5581fe51..18aded6dc4 100644 --- a/environment.c +++ b/environment.c @@ -87,6 +87,7 @@ const char * const local_repo_env[LOCAL_REPO_ENV_SIZE + 1] = { static void setup_git_env(void) { git_dir = getenv(GIT_DIR_ENVIRONMENT); + git_dir = git_dir ? xstrdup(git_dir) : NULL; if (!git_dir) { git_dir = read_gitfile_gently(DEFAULT_GIT_DIR_ENVIRONMENT); git_dir = git_dir ? xstrdup(git_dir) : NULL; |