Merge branch 'sg/fast-import-dump-refs-on-checkpoint-fix'
[gitweb.git] / t / lib-submodule-update.sh
index 12cd4e9233e345a1432e18b205e2833856a4425a..5b56b23166bb3dea2e89cea38a19eb5698dfff53 100755 (executable)
@@ -235,7 +235,7 @@ reset_work_tree_to_interested () {
        then
                mkdir -p submodule_update/.git/modules/sub1/modules &&
                cp -r submodule_update_repo/.git/modules/sub1/modules/sub2 submodule_update/.git/modules/sub1/modules/sub2
-               GIT_WORK_TREE=. git -C submodule_update/.git/modules/sub1/modules/sub2 config --unset core.worktree
+               # core.worktree is unset for sub2 as it is not checked out
        fi &&
        # indicate we are interested in the submodule:
        git -C submodule_update config submodule.sub1.url "bogus" &&
@@ -756,7 +756,7 @@ test_submodule_recursing_with_args_common() {
                        : >sub1/untrackedfile &&
                        test_must_fail $command replace_sub1_with_file &&
                        test_superproject_content origin/add_sub1 &&
-                       test_submodule_content sub1 origin/add_sub1
+                       test_submodule_content sub1 origin/add_sub1 &&
                        test -f sub1/untracked_file
                )
        '
@@ -782,7 +782,8 @@ test_submodule_recursing_with_args_common() {
                (
                        cd submodule_update &&
                        git branch -t invalid_sub1 origin/invalid_sub1 &&
-                       test_must_fail $command invalid_sub1 &&
+                       test_must_fail $command invalid_sub1 2>err &&
+                       test_i18ngrep sub1 err &&
                        test_superproject_content origin/add_sub1 &&
                        test_submodule_content sub1 origin/add_sub1
                )
@@ -843,7 +844,7 @@ test_submodule_switch_recursing_with_args () {
                        cd submodule_update &&
                        git branch -t add_sub1 origin/add_sub1 &&
                        : >sub1 &&
-                       echo sub1 >.git/info/exclude
+                       echo sub1 >.git/info/exclude &&
                        $command add_sub1 &&
                        test_superproject_content origin/add_sub1 &&
                        test_submodule_content sub1 origin/add_sub1
@@ -970,7 +971,6 @@ test_submodule_forced_switch_recursing_with_args () {
                        rm -rf .git/modules/sub1 &&
                        $command replace_sub1_with_directory &&
                        test_superproject_content origin/replace_sub1_with_directory &&
-                       test_submodule_content sub1 origin/modify_sub1
                        test_git_directory_exists sub1
                )
        '