Browse Source

Merge branch 'pb/config' into next

maint
Junio C Hamano 19 years ago
parent
commit
9e37f72afe
  1. 2
      config.c
  2. 2
      repo-config.c

2
config.c

@ -335,7 +335,7 @@ int git_config(config_fn_t fn)


if (home) { if (home) {
char *user_config = strdup(mkpath("%s/.gitconfig", 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); ret = git_config_from_file(fn, user_config);
free(user_config); free(user_config);
} }

2
repo-config.c

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

Loading…
Cancel
Save