MCPcopy Index your code
hub / github.com/git/git / get_socket_path

Function get_socket_path

builtin/credential-cache.c:120–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static char *get_socket_path(void)
121{
122 struct stat sb;
123 char *old_dir, *socket;
124 old_dir = interpolate_path("~/.git-credential-cache", 0);
125 if (old_dir && !stat(old_dir, &sb) && S_ISDIR(sb.st_mode))
126 socket = xstrfmt("%s/socket", old_dir);
127 else
128 socket = xdg_cache_home("credential/socket");
129 free(old_dir);
130 return socket;
131}
132
133static void announce_capabilities(void)
134{

Callers 1

cmd_credential_cacheFunction · 0.85

Calls 4

interpolate_pathFunction · 0.85
xstrfmtFunction · 0.85
xdg_cache_homeFunction · 0.85
statClass · 0.70

Tested by

no test coverage detected