MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / resolve_xdg_git_config_dir

Function resolve_xdg_git_config_dir

src/discover/discover.c:298–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298static bool resolve_xdg_git_config_dir(char *out, size_t out_sz) {
299 char env[CBM_SZ_4K];
300 if (cbm_safe_getenv("XDG_CONFIG_HOME", env, sizeof(env), NULL) && env[0] != '\0') {
301 snprintf(out, out_sz, "%s", env);
302 cbm_normalize_path_sep(out);
303 return true;
304 }
305
306 const char *home = cbm_get_home_dir();
307 if (!home || home[0] == '\0') {
308 return false;
309 }
310 path_join(out, out_sz, home, ".config");
311 return out[0] != '\0';
312}
313
314static bool resolve_global_excludes_path(char *out, size_t out_sz) {
315 char config_path[CBM_SZ_4K];

Callers 1

Calls 4

cbm_safe_getenvFunction · 0.85
cbm_normalize_path_sepFunction · 0.85
cbm_get_home_dirFunction · 0.85
path_joinFunction · 0.85

Tested by

no test coverage detected