Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git.txt5
-rw-r--r--git.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 3b0d530257..75b3e1b87c 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -120,7 +120,10 @@ OPTIONS
variable.
--bare::
- Same as --git-dir=`pwd`.
+ Treat the repository as a bare repository. If GIT_DIR
+ environment is not set, it is set to the current working
+ directory.
+
FURTHER DOCUMENTATION
---------------------
diff --git a/git.c b/git.c
index b6e292e29f..fd3d83cd4c 100644
--- a/git.c
+++ b/git.c
@@ -94,7 +94,7 @@ 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;
- setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 1);
+ setenv(GIT_DIR_ENVIRONMENT, getcwd(git_dir, sizeof(git_dir)), 0);
if (envchanged)
*envchanged = 1;
} else {