Subject: Re: [PATCH 1/1] git-config: git-config --list fixed when GIT_CONFIG value starts with ~/

From: Junio C Hamano <[email-masked]>
Date: Fri, 14 Nov 2014 12:10:16 -0800

0xAX <[email-masked]> 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.