rebase --autostash: demonstrate a problem with dirty submodules
[gitweb.git] / t / t3420-rebase-autostash.sh
index 6826c38cbde39d5fb0e1f73e1abf0c877b0c4f78..b6e18566b5609e82eb954d156eed21076f475bdf 100755 (executable)
@@ -178,7 +178,7 @@ testrebase () {
                test_when_finished git branch -D rebased-feature-branch &&
                suffix=${type#\ --} && suffix=${suffix:-am} &&
                create_expected_success_$suffix &&
-               test_cmp expected actual
+               test_i18ncmp expected actual
        '
 
        test_expect_success "rebase$type: dirty index, non-conflicting rebase" '
@@ -275,7 +275,7 @@ testrebase () {
                test_when_finished git branch -D rebased-feature-branch &&
                suffix=${type#\ --} && suffix=${suffix:-am} &&
                create_expected_failure_$suffix &&
-               test_cmp expected actual
+               test_i18ncmp expected actual
        '
 }
 
@@ -351,4 +351,14 @@ test_expect_success 'autostash is saved on editor failure with conflict' '
        test_cmp expected file0
 '
 
+test_expect_failure 'autostash with dirty submodules' '
+       test_when_finished "git reset --hard && git checkout master" &&
+       git checkout -b with-submodule &&
+       git submodule add ./ sub &&
+       test_tick &&
+       git commit -m add-submodule &&
+       echo changed >sub/file0 &&
+       git rebase -i --autostash HEAD
+'
+
 test_done