Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:56

0xAX [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help