> They wouldn't. It was my oblique way to say "it is unclear from the
> patch description and the code why this is a good idea---it needs to
> be explained better" ;-).
Ok, I will submit a new patch with a better explanation.
Devin
> 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
Jeff King writes:
> On Mon, Mar 13, 2017 at 11:09:11AM -0700, Junio C Hamano wrote:
>
>> > + if (home_socket)
>> > + if (file_exists(home_socket))
>> > + return home_socket;
>> > + else
>> > + free(home_socket);
>> > +
>> > + return xdg_cache_
On Mon, Mar 13, 2017 at 11:09:11AM -0700, Junio C Hamano wrote:
> > + if (home_socket)
> > + if (file_exists(home_socket))
> > + return home_socket;
> > + else
> > + free(home_socket);
> > +
> > + return xdg_cache_home("credential/socket"
On Mon, Mar 13, 2017 at 01:22:31PM -0400, Devin Lehmacher wrote:
> Subject: Re: [GSoC][PATCH 2/3] credential-cache.c: Make git use
> XDG_CACHE_HOME for credentials
Another subject nitpick. :)
Saying "Make git" is just extraneous. All commits make git do something.
Likewise
Devin Lehmacher writes:
> +static char* get_socket_path(void) {
By the way, in our codebase (which is C not C++), the asterisk does
not stick to the type, i.e. the above should be:
static char *get_socket_path(void)
{
Devin Lehmacher writes:
> +static char* get_socket_path(void) {
> + char *home_socket;
> +
> + home_socket = expand_user_path("~/.git_credential_cache/socket");
The typo on this line guarantees that nobody will retain the current
location and will be migrated forcibly to the new xdg plac
git-credential-cache will now use the socket
$XDG_CACHE_HOME/git/credential/socket if there is not already a socket
at ~/.git-credential-cache/socket. This ensures that if another process
already created a socket at the old location it will be used over the
new one if it exists.
Signed-off-by: Dev
8 matches
Mail list logo