diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-07-28 00:01:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-28 00:01:36 +0200 |
commit | e5498e8a9f9a596ecff78426bbf904626cd7863a (patch) | |
tree | 0d8f2d6df322847817a42cc371c78984125a3190 /path.c | |
parent | Merge branch 'maint-1.7.0' into maint-1.7.1 (diff) | |
parent | Git 1.7.0.7 (diff) | |
download | git-e5498e8a9f9a596ecff78426bbf904626cd7863a.tar.xz git-e5498e8a9f9a596ecff78426bbf904626cd7863a.zip |
Sync with 1.7.0 series
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -316,6 +316,8 @@ char *expand_user_path(const char *path) size_t username_len = first_slash - username; if (username_len == 0) { const char *home = getenv("HOME"); + if (!home) + goto return_null; strbuf_add(&user_path, home, strlen(home)); } else { struct passwd *pw = getpw_str(username, username_len); |