From d3dcd107758907e38751fb50631e9acf315a6bad Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Sun, 18 Nov 2007 12:23:52 +0100 Subject: [PATCH] git.c: Take '--bare' handling from mingw master Merge commit 53009e47c2b55d6c23925bb77116545f2308cef9 introduced an if() statement that is not present in mingw's master. This commit changes the code to match mingw's master. Signed-off-by: Steffen Prohaska --- git.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/git.c b/git.c index 615093453b..e2c79a1efc 100644 --- a/git.c +++ b/git.c @@ -72,11 +72,9 @@ static int handle_options(const char*** argv, int* argc, int* envchanged) } else if (!strcmp(cmd, "--bare")) { static char git_dir[PATH_MAX+1]; is_bare_repository_cfg = 1; - if (!getenv(GIT_DIR_ENVIRONMENT)) { - set_git_dir(getcwd(git_dir, sizeof(git_dir))); - if (envchanged) - *envchanged = 1; - } + set_git_dir(getcwd(git_dir, sizeof(git_dir))); + if (envchanged) + *envchanged = 1; } else { fprintf(stderr, "Unknown option: %s\n", cmd); usage(git_usage_string);