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

Function resolve_global_excludes_path

src/discover/discover.c:314–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314static bool resolve_global_excludes_path(char *out, size_t out_sz) {
315 char config_path[CBM_SZ_4K];
316
317 const char *home = cbm_get_home_dir();
318 if (home && home[0] != '\0') {
319 path_join(config_path, sizeof(config_path), home, ".gitconfig");
320 if (read_core_excludes_file(config_path, out, out_sz)) {
321 return true;
322 }
323 }
324
325 char xdg_config[CBM_SZ_4K];
326 if (resolve_xdg_git_config_dir(xdg_config, sizeof(xdg_config))) {
327 path_join(config_path, sizeof(config_path), xdg_config, "git/config");
328 if (read_core_excludes_file(config_path, out, out_sz)) {
329 return true;
330 }
331 path_join(out, out_sz, xdg_config, "git/ignore");
332 return out[0] != '\0';
333 }
334
335 return false;
336}
337
338/* ── Public filter functions ─────────────────────── */
339

Callers 1

discover_implFunction · 0.85

Calls 4

cbm_get_home_dirFunction · 0.85
path_joinFunction · 0.85
read_core_excludes_fileFunction · 0.85

Tested by

no test coverage detected