| 296 | } |
| 297 | |
| 298 | static 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 | |
| 314 | static bool resolve_global_excludes_path(char *out, size_t out_sz) { |
| 315 | char config_path[CBM_SZ_4K]; |
no test coverage detected