Introduce 'submodule.recurse' option for worktree manipulators
[gitweb.git] / t / lib-submodule-update.sh
index 0272c4d8cad05a803cd19654875597371584cb8e..52beadad964bb6ab157b4a0f2659ca936b728b9b 100755 (executable)
@@ -990,6 +990,18 @@ test_submodule_switch_recursing_with_args () {
                )
        '
 
+       test_expect_success "git -c submodule.recurse=true $cmd_args: modified submodule updates submodule work tree" '
+               prolog &&
+               reset_work_tree_to_interested add_sub1 &&
+               (
+                       cd submodule_update &&
+                       git branch -t modify_sub1 origin/modify_sub1 &&
+                       git -c submodule.recurse=true $cmd_args modify_sub1 &&
+                       test_superproject_content origin/modify_sub1 &&
+                       test_submodule_content sub1 origin/modify_sub1
+               )
+       '
+
        # Updating a submodule to an invalid sha1 doesn't update the
        # superproject nor the submodule's work tree.
        test_expect_success "$command: updating to a missing submodule commit fails" '