MCPcopy Index your code
hub / github.com/git/git / submodule_unset_core_worktree

Function submodule_unset_core_worktree

submodule.c:2059–2074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2057}
2058
2059void 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
2076static int submodule_has_dirty_index(const struct submodule *sub)
2077{

Callers 2

submodule_move_headFunction · 0.85
deinit_submoduleFunction · 0.85

Calls 6

validate_submodule_pathFunction · 0.85
submodule_name_to_gitdirFunction · 0.85
strbuf_addstrFunction · 0.85
warningFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected