From 9ef5c15d66da91360eeca7e89d512a6b506f6d57 Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Tue, 1 Jan 2008 20:31:30 +0100 Subject: [PATCH] Revert replacing getenv() with get_git_dir() This partially reverts commit 855f254b2b5b083a63fc8d7709a42e2cbdc5a136. All tests still pass after this revert. The original commit seems unnecessary. Signed-off-by: Steffen Prohaska --- builtin-init-db.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin-init-db.c b/builtin-init-db.c index 6c46af9228..79eaf8d6ed 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -367,7 +367,9 @@ int cmd_init_db(int argc, const char **argv, const char *prefix) /* * Set up the default .git directory contents */ - git_dir = get_git_dir(); + git_dir = getenv(GIT_DIR_ENVIRONMENT); + if (!git_dir) + git_dir = DEFAULT_GIT_DIR_ENVIRONMENT; safe_create_dir(git_dir, 0); /* Check to see if the repository version is right.