summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/environment.c b/environment.c
index 1f0bda5afa..aa478e71de 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;
}