From: Junio C Hamano Date: Fri, 14 Nov 2014 20:10:16 GMT Subject: Re: [PATCH 1/1] git-config: git-config --list fixed when GIT_CONFIG value starts with ~/ Message-ID: In-Reply-To: <1415989760-20259-1-git-send-email-kuleshovmail@gmail.com> 0xAX writes: > When we execute git config --list and $GIT_CONFIG value starts with home > prefix - ~/ it produces folowing error - fatal: unable to read config > file '~/.gitconfig': No such file or directory. This patch fixed it with > expand_user_path for configuration file path before git-config --list > call. Expanding tilde ~ in environment variables is what you let your shell do when you assign it. This is not limited to Git: $ FOO=~/.bashrc $ BAR='~/.bashrc' $ head -n 1 "$FOO" # Bourne Again SHell init file. $ head -n 1 "$BAR" head: cannot open ‘~/.bashrc’ for reading: No such file rdirectory $ echo "FOO=$FOO" "BAR=$BAR" FOO=/home/gitster/.bashrc BAR=~/.bashrc The patch does not fix anything and not necessary.