diff options
Diffstat (limited to 't/t3513-revert-submodule.sh')
-rwxr-xr-x | t/t3513-revert-submodule.sh | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/t/t3513-revert-submodule.sh b/t/t3513-revert-submodule.sh index 5e39fcdb66..8bfe3ed246 100755 --- a/t/t3513-revert-submodule.sh +++ b/t/t3513-revert-submodule.sh @@ -14,18 +14,26 @@ test_description='revert can handle submodules' git_revert () { git status -su >expect && ls -1pR * >>expect && - tar cf "$TRASH_DIRECTORY/tmp.tar" * && - git checkout "$1" && + "$TAR" cf "$TRASH_DIRECTORY/tmp.tar" * && + 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" && + "$TAR" xf "$TRASH_DIRECTORY/tmp.tar" && git status -su >actual && ls -1pR * >>actual && test_cmp expect actual && git revert HEAD } -KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1 -test_submodule_switch "git_revert" +if test "$GIT_TEST_MERGE_ALGORITHM" != ort +then + KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1 +fi +test_submodule_switch_func "git_revert" test_done |