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
This commit is contained in:
commit
af41867169
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user