1
0
mirror of https://github.com/git/git.git synced 2024-11-19 18:44:08 +01:00

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>
This commit is contained in:
Johannes Schindelin 2006-06-20 09:45:53 +02:00 committed by Junio C Hamano
parent 5f1a63e0ef
commit 92a28be0ce

@ -74,8 +74,6 @@ static int get_value(const char* key_, const char* regex_)
const char *home = getenv("HOME");
local = getenv("GIT_CONFIG_LOCAL");
if (!local)
local = repo_config;
else
local = repo_config = strdup(git_path("config"));
if (home)
global = strdup(mkpath("%s/.gitconfig", home));