Re: [GSOC] Microproject "Move ~/.git-credential-cache to ~/.config/git"
- From
惠轶群 <huiyiqun@gmail.com>
- Date
- Mar 15, 2016, 01:32 UTC
- Message-ID
- <CAKqreuw0hafi-GwWD-UaGKwmG8xVK6ZJDcw2jpQXAAuK+XBZvQ@mail.gmail.com>
- In-Reply-To
- <xmqqwpp494vd.fsf@gitster.mtv.corp.google.com>
> You sound like you think it is better to check the location of the > existing socket,
Yes, for the purpose of compatibility, it's the only choice, as I can see.
To sum up, I'd like to implement:
1. <path> is configured by --socket, then put it here. 2. else if `~/.git-credential-cache` exists, put the socket under here. 3. else, put the socket under `$XDG_RUNTIME_DIR/git/credential-cache.sock`, if $XDG_RUNTIME_DIR does not exist, default to `/tmp/git-$UID/credential-cache.sock`.
As a result, new user will use xdg-compatible path while old user will not be surprised.