]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule.c
builtin/notes: remove unnecessary free
[thirdparty/git.git] / submodule.c
index 50cbf5f13ed84c5da081b4130bbd50b7b97e3121..a2b266fbfae2cd89b00a11008fbcd28bf09777e2 100644 (file)
@@ -1534,18 +1534,6 @@ out:
        return ret;
 }
 
-void submodule_unset_core_worktree(const struct submodule *sub)
-{
-       char *config_path = xstrfmt("%s/modules/%s/config",
-                                   get_git_common_dir(), sub->name);
-
-       if (git_config_set_in_file_gently(config_path, "core.worktree", NULL))
-               warning(_("Could not unset core.worktree setting in submodule '%s'"),
-                         sub->path);
-
-       free(config_path);
-}
-
 static const char *get_super_prefix_or_empty(void)
 {
        const char *s = get_super_prefix();
@@ -1711,8 +1699,6 @@ int submodule_move_head(const char *path,
 
                        if (is_empty_dir(path))
                                rmdir_or_warn(path);
-
-                       submodule_unset_core_worktree(sub);
                }
        }
 out: