repo-config: Fix late-night bug
This bug was hidden by the "future-proofing" of the test. Sigh. When neither GIT_CONFIG nor GIT_CONFIG_LOCAL is set, do not use NULL, but $GIT_DIR/config. Instead of using $GIT_DIR/config when only GIT_CONFIG_LOCAL is set. Sorry. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Jun 20, 2006 at 09:45 UTC
92a28be0ce12a50e0e53268be99130c2ef504c7e
1 file changed
-2
repo-config.c
-2
@@ -74,8 +74,6 @@ static int get_value(const char* key_, const char* regex_)
74
const char *home = getenv("HOME");
75
local = getenv("GIT_CONFIG_LOCAL");
76
if (!local)
77
- local = repo_config;
78
- else
77
local = repo_config = strdup(git_path("config"));
78
if (home)
79
global = strdup(mkpath("%s/.gitconfig", home));