mirror of
https://github.com/git/git.git
synced 2026-03-14 02:43:25 +01:00
git.c: Take '--bare' handling from mingw master
Merge commit 53009e47c2
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 <prohaska@zib.de>
This commit is contained in:
8
git.c
8
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);
|
||||
|
||||
Reference in New Issue
Block a user