X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=t%2Ft3513-revert-submodule.sh;fp=t%2Ft3513-revert-submodule.sh;h=a759f12cbb1d6b7676d639806cdbe94e1cc201ac;hp=5e39fcdb66c0c7c4b112c1bbe941d886db237693;hb=efafdca42162843e90cefdeefd8e6c244cee91f5;hpb=0a23331aa6bac1447d7983111d9c3efbea970cb3 diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh index 5e39fcdb66..a759f12cbb 100755 --- a/t/t3513-revert-submodule.sh +++ b/t/t3513-revert-submodule.sh @@ -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