]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3513-revert-submodule.sh
Merge branch 'dl/test-must-fail-fixes-5'
[thirdparty/git.git] / t / t3513-revert-submodule.sh
index 5e39fcdb66c0c7c4b112c1bbe941d886db237693..a759f12cbb1d6b7676d639806cdbe94e1cc201ac 100755 (executable)
@@ -15,7 +15,12 @@ git_revert () {
        git status -su >expect &&
        ls -1pR * >>expect &&
        tar cf "$TRASH_DIRECTORY/tmp.tar" * &&
-       git checkout "$1" &&
+       may_only_be_test_must_fail "$2" &&
+       $2 git checkout "$1" &&
+       if test -n "$2"
+       then
+               return
+       fi &&
        git revert HEAD &&
        rm -rf * &&
        tar xf "$TRASH_DIRECTORY/tmp.tar" &&
@@ -26,6 +31,6 @@ git_revert () {
 }
 
 KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
-test_submodule_switch "git_revert"
+test_submodule_switch_func "git_revert"
 
 test_done