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

Function xdg_cache_home

path.c:1567–1580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1565}
1566
1567char *xdg_cache_home(const char *filename)
1568{
1569 const char *home, *cache_home;
1570
1571 assert(filename);
1572 cache_home = getenv("XDG_CACHE_HOME");
1573 if (cache_home && *cache_home)
1574 return mkpathdup("%s/git/%s", cache_home, filename);
1575
1576 home = getenv("HOME");
1577 if (home)
1578 return mkpathdup("%s/.cache/git/%s", home, filename);
1579 return NULL;
1580}
1581
1582REPO_GIT_PATH_FUNC(squash_msg, "SQUASH_MSG")
1583REPO_GIT_PATH_FUNC(merge_msg, "MERGE_MSG")

Callers 1

get_socket_pathFunction · 0.85

Calls 1

mkpathdupFunction · 0.85

Tested by

no test coverage detected