Add a Windows-specific fallback to getenv("HOME");

This fixes msysGit issue 482 properly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2010-06-02 00:41:33 +02:00
parent 38ab7608d6
commit cefa4fe5e8
6 changed files with 29 additions and 4 deletions

View File

@@ -788,7 +788,7 @@ int git_config(config_fn_t fn, void *data)
found += 1;
}
home = getenv("HOME");
home = get_home_directory();
if (git_config_global() && home) {
char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
if (!access(user_config, R_OK)) {