Merge branch 'jt/commit-graph-per-object-store'
[gitweb.git] / t / t7406-submodule-update.sh
index 2463863a51f3ca0dcb112cbcb24c6682b2af67a7..10dc91620a69870ab5dac213d032ae5d9938128c 100755 (executable)
@@ -115,17 +115,17 @@ Submodule path '../super/submodule': checked out '$submodulesha1'
 EOF
 
 cat <<EOF >expect2
+Cloning into '$pwd/recursivesuper/super/merging'...
+Cloning into '$pwd/recursivesuper/super/none'...
+Cloning into '$pwd/recursivesuper/super/rebasing'...
+Cloning into '$pwd/recursivesuper/super/submodule'...
 Submodule 'merging' ($pwd/merging) registered for path '../super/merging'
 Submodule 'none' ($pwd/none) registered for path '../super/none'
 Submodule 'rebasing' ($pwd/rebasing) registered for path '../super/rebasing'
 Submodule 'submodule' ($pwd/submodule) registered for path '../super/submodule'
-Cloning into '$pwd/recursivesuper/super/merging'...
 done.
-Cloning into '$pwd/recursivesuper/super/none'...
 done.
-Cloning into '$pwd/recursivesuper/super/rebasing'...
 done.
-Cloning into '$pwd/recursivesuper/super/submodule'...
 done.
 EOF
 
@@ -137,7 +137,8 @@ test_expect_success 'submodule update --init --recursive from subdirectory' '
         git submodule update --init --recursive ../super >../../actual 2>../../actual2
        ) &&
        test_i18ncmp expect actual &&
-       test_i18ncmp expect2 actual2
+       sort actual2 >actual2.sorted &&
+       test_i18ncmp expect2 actual2.sorted
 '
 
 cat <<EOF >expect2
@@ -174,7 +175,7 @@ test_expect_success 'submodule update does not fetch already present commits' '
          git submodule update > ../actual 2> ../actual.err
        ) &&
        test_i18ncmp expected actual &&
-       ! test -s actual.err
+       test_must_be_empty actual.err
 '
 
 test_expect_success 'submodule update should fail due to local changes' '
@@ -606,7 +607,7 @@ test_expect_success 'submodule update - update=none in .git/config but --checkou
         git diff --name-only >out &&
         ! grep ^submodule$ out &&
         (cd submodule &&
-         test_must_fail compare_head
+         ! compare_head
         ) &&
         git config --unset submodule.submodule.update
        )
@@ -620,8 +621,8 @@ test_expect_success 'submodule update --init skips submodule with update=none' '
        git clone super cloned &&
        (cd cloned &&
         git submodule update --init &&
-        test -e submodule/.git &&
-        test_must_fail test -e none/.git
+        test_path_exists submodule/.git &&
+        test_path_is_missing none/.git
        )
 '