git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC] Move ~/.git-credential-cache to ~/.cache/git

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 11, 2017, 00:26 UTC
Message-ID
<20170311002615.GG26789@aiede.mtv.corp.google.com>
In-Reply-To
<8BE1A361-32BB-4164-AD54-949555855C52@cornell.edu>

(+cc: npostavs) Hi Devin,

Devin Lehmacher wrote:
Show 11 quoted lines
> I started working on this microproject and am not quite sure what is
> necessary for backwards compatibility. Since the socket is recreated
> whenever the credential daemon exits backwards compatibility
> shouldn’t really be a concern with regard to where the socket is
> located in the filesystem.
>
> However, contrib/persistent-https depends on the socket being at
> ~/.git-credential-cache/socket, so changing the default location
> would break this. However, if we need to keep the socket at that
> location for cases like this I don’t understand how this change
> would be helpful in any way.

That's a good question. If I'm reading contrib/persistent-https/ correctly, it uses the same directory but doesn't rely on the socket there, so it should not be a problem.

However, that reminded me to search for other tools that might rely on the socket. Using https://codesearch.debian.net/search?q=%5C.git-credential-cache, I find that magit does rely on the socket path.

 $ git clone https://github.com/magit/magit
 $ git log -S.git-credential-cache
 commit 0f30dfbb0075ac2e99b65a2c7fac360197a989c1
 Author: Noam Postavsky <npostavs@users.sourceforge.net>
 Date:   Sat Oct 24 15:57:54 2015 -0400
    Start credential daemon on magit-credential-hook
    If we let git start the daemon, Emacs will send a SIGHUP when git
    finishes and closes the pty, killing the daemon.  Hence the need to have
    our own daemon running first.
Cc-ing Noam to figure out what a safe transition will look like.

Thanks for noticing, Jonathan

Previous: Devin LehmacherNext: Noam Postavsky
Message 2 of 5 in “[GSoC] Move ~/.git-credential-cache to ~/.cache/git”
  1. Devin LehmacherMar 10, 2017
  2. Jonathan NiederMar 11, 2017
  3. Noam PostavskyMar 11, 2017
  4. Devin LehmacherMar 11, 2017
  5. Junio C HamanoMar 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.