3 test_description='rebase can handle submodules'
6 . "$TEST_DIRECTORY"/lib-submodule-update.sh
7 . "$TEST_DIRECTORY"/lib-rebase.sh
10 git status -su >expect &&
12 git checkout -b ours HEAD &&
15 git commit -m add_x &&
17 git status -su >actual &&
19 test_cmp expect actual &&
20 may_only_be_test_must_fail "$2" &&
24 test_submodule_switch_func "git_rebase"
26 git_rebase_interactive () {
27 git status -su >expect &&
29 git checkout -b ours HEAD &&
32 git commit -m add_x &&
34 git status -su >actual &&
36 test_cmp expect actual &&
38 echo "fake-editor.sh" >.git/info/exclude &&
39 may_only_be_test_must_fail "$2" &&
43 test_submodule_switch_func "git_rebase_interactive"
45 test_expect_success 'rebase interactive ignores modified submodules' '
46 test_when_finished "rm -rf super sub" &&
48 git -C sub commit --allow-empty -m "Initial commit" &&
50 git -C super submodule add ../sub &&
51 git -C super config submodule.sub.ignore dirty &&
53 git -C super add foo &&
54 git -C super commit -m "Initial commit" &&
55 test_commit -C super a &&
56 test_commit -C super b &&
57 test_commit -C super/sub c &&
59 git -C super rebase -i HEAD^^