summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-20 09:39:48 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-20 09:39:48 (GMT)
commit9e37f72afe49c133bfc54b17b659b2ae6f189b7f (patch)
tree98aa954b22b9a24563da7e187fe034ef73831601
parent592689c46187165d80ab35c9090404b7ee248dbb (diff)
parente33d0611c0dd438ed9c1960518540c707201707a (diff)
downloadgit-9e37f72afe49c133bfc54b17b659b2ae6f189b7f.zip
git-9e37f72afe49c133bfc54b17b659b2ae6f189b7f.tar.gz
git-9e37f72afe49c133bfc54b17b659b2ae6f189b7f.tar.bz2
Merge branch 'pb/config' into next
-rw-r--r--config.c2
-rw-r--r--repo-config.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/config.c b/config.c
index d064f42..3e077d4 100644
--- a/config.c
+++ b/config.c
@@ -335,7 +335,7 @@ int git_config(config_fn_t fn)
if (home) {
char *user_config = strdup(mkpath("%s/.gitconfig", home));
- if (access(user_config, R_OK) > 0)
+ if (!access(user_config, R_OK))
ret = git_config_from_file(fn, user_config);
free(user_config);
}
diff --git a/repo-config.c b/repo-config.c
index 03f108f..ab8f1af 100644
--- a/repo-config.c
+++ b/repo-config.c
@@ -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));