3 test_description='revert can handle submodules'
6 . "$TEST_DIRECTORY"/lib-submodule-update.sh
8 # Create a revert that moves from HEAD (including any test modifications to
9 # the work tree) to $1 by first checking out $1 and reverting it. Reverting
10 # the revert is the transition we test for. We tar the current work tree
11 # first so we can restore the work tree test setup after doing the checkout
12 # and revert. We test here that the restored work tree content is identical
13 # to that at the beginning. The last revert is then tested by the framework.
15 git status -su >expect &&
17 tar czf "$TRASH_DIRECTORY/tmp.tgz" * &&
21 tar xzf "$TRASH_DIRECTORY/tmp.tgz" &&
22 git status -su >actual &&
24 test_cmp expect actual &&
28 KNOWN_FAILURE_CHERRY_PICK_SEES_EMPTY_COMMIT=1
29 KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
30 test_submodule_switch "git_revert"