From: Steffen Prohaska Date: Wed, 21 Nov 2007 20:27:20 GMT Subject: [PATCH 2/3] builtin-init-db: use get_git_dir() instead of getenv() Message-ID: <11956768413887-git-send-email-prohaska@zib.de> In-Reply-To: <11956768412804-git-send-email-prohaska@zib.de> We have a function get_git_dir(). So let's use it, instead of querying the environment. Signed-off-by: Steffen Prohaska --- 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