Merge branch 'ds/commit-graph-with-grafts' into maint
[gitweb.git] / builtin / submodule--helper.c
index 2bcc70fdfe2608ccbbab02b6f593dd81781ada41..5e6f2db4cdbcf9e88ddfc1890359f7f2f86b2cd2 100644 (file)
@@ -542,7 +542,7 @@ static void runcommand_in_submodule_cb(const struct cache_entry *list_item,
                argv_array_pushv(&cpr.args, info->argv);
 
                if (run_command(&cpr))
-                       die(_("run_command returned non-zero status while"
+                       die(_("run_command returned non-zero status while "
                                "recursing in the nested submodules of %s\n."),
                                displaypath);
        }
@@ -1123,8 +1123,6 @@ static void deinit_submodule(const char *path, const char *prefix,
                if (!(flags & OPT_QUIET))
                        printf(format, displaypath);
 
-               submodule_unset_core_worktree(sub);
-
                strbuf_release(&sb_rm);
        }
 
@@ -1235,6 +1233,7 @@ static int clone_submodule(const char *path, const char *gitdir, const char *url
        if (gitdir && *gitdir)
                argv_array_pushl(&cp.args, "--separate-git-dir", gitdir, NULL);
 
+       argv_array_push(&cp.args, "--");
        argv_array_push(&cp.args, url);
        argv_array_push(&cp.args, path);
 
@@ -2005,29 +2004,6 @@ static int check_name(int argc, const char **argv, const char *prefix)
        return 0;
 }
 
-static int connect_gitdir_workingtree(int argc, const char **argv, const char *prefix)
-{
-       struct strbuf sb = STRBUF_INIT;
-       const char *name, *path;
-       char *sm_gitdir;
-
-       if (argc != 3)
-               BUG("submodule--helper connect-gitdir-workingtree <name> <path>");
-
-       name = argv[1];
-       path = argv[2];
-
-       strbuf_addf(&sb, "%s/modules/%s", get_git_dir(), name);
-       sm_gitdir = absolute_pathdup(sb.buf);
-
-       connect_work_tree_and_git_dir(path, sm_gitdir, 0);
-
-       strbuf_release(&sb);
-       free(sm_gitdir);
-
-       return 0;
-}
-
 #define SUPPORT_SUPER_PREFIX (1<<0)
 
 struct cmd_struct {
@@ -2041,7 +2017,6 @@ static struct cmd_struct commands[] = {
        {"name", module_name, 0},
        {"clone", module_clone, 0},
        {"update-clone", update_clone, 0},
-       {"connect-gitdir-workingtree", connect_gitdir_workingtree, 0},
        {"relative-path", resolve_relative_path, 0},
        {"resolve-relative-url", resolve_relative_url, 0},
        {"resolve-relative-url-test", resolve_relative_url_test, 0},