Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
config --get --path: check for unset $HOME
[gitweb.git]
/
path.c
diff --git
a/path.c
b/path.c
index aaa9345ebca4140317d8509ba95ec61cff82192d..f6226fcd557b1b06706775cb3a32cc780ee2b708 100644
(file)
--- a/
path.c
+++ b/
path.c
@@
-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);