Skip to content

Commit

Permalink
repo-config: Fix late-night bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Jun 20, 2006
1 parent 5f1a63e commit 92a28be
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions repo-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 92a28be

Please sign in to comment.