Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'pb/config' into next
author
Junio C Hamano
<junkio@cox.net>
Tue, 20 Jun 2006 09:39:48 +0000
(
02:39
-0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 20 Jun 2006 09:39:48 +0000
(
02:39
-0700)
config.c
patch
|
blob
|
history
repo-config.c
patch
|
blob
|
history
raw
(from parent 1:
592689c
)
diff --git
a/config.c
b/config.c
index d064f429cb4369ac08f7ad267b0b182112462b16..3e077d4c6ca4f7162e3a3254e1b3e90db33270ff 100644
(file)
--- 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 03f108fe2f8a624075e7e7db4177df13dc38372f..ab8f1afeea0cbff7707e313af1c18ff56363ae09 100644
(file)
--- 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));