summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6adcca3)
raw | patch | inline | side by side (parent: 6adcca3)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Aug 2007 05:41:23 +0000 (22:41 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Aug 2007 05:44:41 +0000 (22:44 -0700) |
"GIT_DIR=some.where git --bare cmd" and worse yet
"git --git-dir=some.where --bare cmd" were very confusing. They
both ignored git-dir specified, and instead made $cwd as GIT_DIR.
This changes --bare not to override existing GIT_DIR.
This has been like this for a long time. Let's hope nobody sane
relied on this insane behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"git --git-dir=some.where --bare cmd" were very confusing. They
both ignored git-dir specified, and instead made $cwd as GIT_DIR.
This changes --bare not to override existing GIT_DIR.
This has been like this for a long time. Let's hope nobody sane
relied on this insane behaviour.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 3b0d530257c66a5562ced91cc506e49d4ff484d3..75b3e1b87c926dedc54e8e3ac1b120ea28a2b93f 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
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
---------------------
index b6e292e29fa63c7652db10853659441de2e89624..fd3d83cd4c49409214dcc3e54480b7650e1b8b18 100644 (file)
--- a/git.c
+++ b/git.c
} 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 {