config --get --path: check for unset $HOME
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 26 Jul 2010 15:06:51 +0000 (10:06 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Jul 2010 17:58:46 +0000 (10:58 -0700)
If $HOME is unset (as in some automated build situations),
currently

git config --path path.home "~"
git config --path --get path.home

segfaults. Error out with

Failed to expand user dir in: '~/'

instead.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found