| 2057 | } |
| 2058 | |
| 2059 | void submodule_unset_core_worktree(const struct submodule *sub) |
| 2060 | { |
| 2061 | struct strbuf config_path = STRBUF_INIT; |
| 2062 | |
| 2063 | if (validate_submodule_path(sub->path) < 0) |
| 2064 | exit(128); |
| 2065 | |
| 2066 | submodule_name_to_gitdir(&config_path, the_repository, sub->name); |
| 2067 | strbuf_addstr(&config_path, "/config"); |
| 2068 | |
| 2069 | if (repo_config_set_in_file_gently(the_repository, config_path.buf, "core.worktree", NULL, NULL)) |
| 2070 | warning(_("Could not unset core.worktree setting in submodule '%s'"), |
| 2071 | sub->path); |
| 2072 | |
| 2073 | strbuf_release(&config_path); |
| 2074 | } |
| 2075 | |
| 2076 | static int submodule_has_dirty_index(const struct submodule *sub) |
| 2077 | { |
no test coverage detected