We have a function get_git_dir(). So let's use it,
instead of querying the environment.
Signed-off-by: Steffen Prohaska <redacted>
---
builtin-init-db.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 763fa55..80d2f27 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -378,9 +378,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
/*
* Set up the default .git directory contents
*/
- git_dir = getenv(GIT_DIR_ENVIRONMENT);
- if (!git_dir)
- git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
+ git_dir = get_git_dir();
safe_create_dir(git_dir, 0);
/* Check to see if the repository version is right.
--
1.5.3.5.750.g8692