| 23 | } |
| 24 | |
| 25 | static void restore_git_env(git_env_snapshot_t *snapshot) { |
| 26 | if (snapshot->home) { |
| 27 | cbm_setenv("HOME", snapshot->home, 1); |
| 28 | free(snapshot->home); |
| 29 | } else { |
| 30 | cbm_unsetenv("HOME"); |
| 31 | } |
| 32 | |
| 33 | if (snapshot->xdg_config_home) { |
| 34 | cbm_setenv("XDG_CONFIG_HOME", snapshot->xdg_config_home, 1); |
| 35 | free(snapshot->xdg_config_home); |
| 36 | } else { |
| 37 | cbm_unsetenv("XDG_CONFIG_HOME"); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | static bool discover_has_rel_path(const cbm_file_info_t *files, int count, const char *rel_path) { |
| 42 | for (int i = 0; i < count; i++) { |
no test coverage detected