]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule.c
Doc: document push.recurseSubmodules=only
[thirdparty/git.git] / submodule.c
index b958162d28631f5298cb2739b15feade8440342a..5c4e52da3d373242ceaa532dd13804e03053752a 100644 (file)
@@ -1130,6 +1130,12 @@ static int push_submodule(const char *path,
        if (for_each_remote_ref_submodule(path, has_remote, NULL) > 0) {
                struct child_process cp = CHILD_PROCESS_INIT;
                strvec_push(&cp.args, "push");
+               /*
+                * When recursing into a submodule, treat any "only" configurations as "on-
+                * demand", since "only" would not work (we need all submodules to be pushed
+                * in order to be able to push the superproject).
+                */
+               strvec_push(&cp.args, "--recurse-submodules=only-is-on-demand");
                if (dry_run)
                        strvec_push(&cp.args, "--dry-run");