| 312 | } |
| 313 | |
| 314 | static 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 |
no test coverage detected