diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-05-16 11:51:51 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-16 11:51:51 +0900 |
commit | 4b44b7b1df44d371eaf3fbed75829d1a749bc7df (patch) | |
tree | d8ea9ed31a6946e476db01034a653a2bbd86084c /environment.c | |
parent | a0ab83ebd807f2bfe1a565ff94fe7d3c6903efee (diff) | |
parent | d026a25657cbe15ceb6bcb5d5047a36a0a70b33e (diff) | |
download | git-4b44b7b1df44d371eaf3fbed75829d1a749bc7df.tar.gz |
Merge branch 'nd/worktree-kill-parse-ref'
"git gc" did not interact well with "git worktree"-managed
per-worktree refs.
* nd/worktree-kill-parse-ref:
refs: kill set_worktree_head_symref()
worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
refs: introduce get_worktree_ref_store()
refs: add REFS_STORE_ALL_CAPS
refs.c: make submodule ref store hashmap generic
environment.c: fix potential segfault by get_git_common_dir()
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/environment.c b/environment.c index ff6e4f06e9..560408953c 100644 --- a/environment.c +++ b/environment.c @@ -217,6 +217,8 @@ const char *get_git_dir(void) const char *get_git_common_dir(void) { + if (!git_dir) + setup_git_env(); return git_common_dir; } |