grep: remove redundant "fixed" field re-assignment to 0
[gitweb.git] / environment.c
index 1f0bda5afabe901bea250e7dabcc39c5325baf88..d40b21fb72168f32f1aaeac553347859e32f90c0 100644 (file)
@@ -8,6 +8,7 @@
  * are.
  */
 #include "cache.h"
+#include "config.h"
 #include "refs.h"
 #include "fmt-merge-msg.h"
 #include "commit.h"
@@ -217,6 +218,8 @@ const char *get_git_dir(void)
 
 const char *get_git_common_dir(void)
 {
+       if (!git_dir)
+               setup_git_env();
        return git_common_dir;
 }