Re: [GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials
- Date: Mon, 13 Mar 2017 15:22:24 -0400
- From: Devin Lehmacher <lehmacdj@xxxxxxxxx>
- Subject: Re: [GSoC][PATCH 2/3] credential-cache.c: Make git use XDG_CACHE_HOME for credentials
> I somehow feel that the order of precedence should be the other way
> around, though.
> If somebody really wants to use the xdg location and has a socket
> already there, using that existing socket would be the right thing
> to do. However, when neither ~/.git-credential-cache/socket nor
> ~/.cache/git/socket exists, why should we prefer the latter over the
At least to me the latter feels superior. It keeps clutter out of the
home directory putting it in a directory with all other cache files from
other programs. If we continue to put the socket at
~/.git-credential-cache/socket by default then checking
~/.cache/git/credential/socket seems useless since the daemon will check
socket locations provided with —-socket anyways and there is no other
way to create the socket at the new location.
To me it would make sense to check the old location and if it is not
there then use the XDG location to follow that standard.
I guess that this is not the same behavior that git config —-global
(it will only put its configuration file there if .gitconfig is unreadable)
has right now though so we should stay consistent and reverse the precedence
Thanks for the feedback,