Sync with 1.7.0 series

This commit is contained in:
Junio C Hamano
2010-07-27 15:01:36 -07:00
4 changed files with 44 additions and 2 deletions

2
path.c
View File

@ -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);