diff options
Diffstat (limited to 't/t3513-revert-submodule.sh')
-rwxr-xr-x | t/t3513-revert-submodule.sh | 9 |
1 files changed, 7 insertions, 2 deletions
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 |