mirror of
https://github.com/git/git.git
synced 2026-02-22 15:51:29 +00:00
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:
2
path.c
2
path.c
@@ -240,7 +240,7 @@ char *expand_user_path(const char *path)
|
||||
const char *username = path + 1;
|
||||
size_t username_len = first_slash - username;
|
||||
if (username_len == 0) {
|
||||
const char *home = getenv("HOME");
|
||||
const char *home = get_home_directory();
|
||||
if (!home)
|
||||
goto return_null;
|
||||
strbuf_add(&user_path, home, strlen(home));
|
||||
|
||||
Reference in New Issue
Block a user