Re: [GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket
- Date: Fri, 17 Mar 2017 16:12:33 +0000
- From: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
- Subject: Re: [GSoC][PATCH v5 2/3] credential-cache: use XDG_CACHE_HOME for socket
On 17/03/17 02:53, Devin Lehmacher wrote:
> Make git-credential-cache follow the XDG base path specification by
> default. This increases consistency with other applications and helps
> keep clutter out of users' home directories.
> Check the old socket location, ~/.git-credential-cache/, and use
> ~/.git-credential-cache/socket if that directory exists rather than
> forcing users who have used `git credential-cache` before to migrate to
> the new XDG compliant location.
> Otherwise use the socket $XDG_CACHE_HOME/git/credential/socket following
> XDG base path specification. Use the subdirectory credential/ in case
> other files are cached under $XDG_CACHE_HOME/git/ in the future and to
> make the socket's purpose clear.
> Signed-off-by: Devin Lehmacher <lehmacdj@xxxxxxxxx>
> Documentation/git-credential-cache.txt | 11 +++++++----
> credential-cache.c | 15 ++++++++++++++-
> 2 files changed, 21 insertions(+), 5 deletions(-)
> diff --git a/Documentation/git-credential-cache.txt b/Documentation/git-credential-cache.txt
> index 96208f822..2b8582639 100644
> --- a/Documentation/git-credential-cache.txt
> +++ b/Documentation/git-credential-cache.txt
> @@ -33,10 +33,13 @@ OPTIONS
> --socket <path>::
> Use `<path>` to contact a running cache daemon (or start a new
> - cache daemon if one is not started). Defaults to
> - `~/.git-credential-cache/socket`. If your home directory is on a
> - network-mounted filesystem, you may need to change this to a
> - local filesystem. You must specify an absolute path.
> + cache daemon if one is not started).
> + Defaults to `$XDG_CACHE_HOME/git/credential/socket` unless
or $HOME/.cache/git/credential/socket if $XDG_CACHE_HOME is not set.
I don't have a good suggestion to re-word this paragraph. (I just
spent ten minutes trying!).
Hmm, git-credential-store doesn't mention the $HOME/.config/git/credentials
outside of the files section. (In particular, not as part of the --file
> + `~/.git-credential-cache/` exists in which case
> + `~/.git-credential-cache/socket` is used instead.
> + If your home directory is on a network-mounted filesystem, you
> + may need to change this to a local filesystem. You must specify
> + an absolute path.