Skip to content

Commit 6d9ff59

Browse files
committed
rebase --autostash: demonstrate a problem with dirty submodules
It has been reported that dirty submodules cause problems with the built-in rebase when it is asked to autostash. The symptom is: fatal: Unexpected stash response: '' This patch adds a regression test that demonstrates that bug. Original report: git-for-windows#1820 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 209f214 commit 6d9ff59

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t3420-rebase-autostash.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,4 +351,14 @@ test_expect_success 'autostash is saved on editor failure with conflict' '
351351
test_cmp expected file0
352352
'
353353

354+
test_expect_failure 'autostash with dirty submodules' '
355+
test_when_finished "git reset --hard && git checkout master" &&
356+
git checkout -b with-submodule &&
357+
git submodule add ./ sub &&
358+
test_tick &&
359+
git commit -m add-submodule &&
360+
echo changed >sub/file0 &&
361+
git rebase -i --autostash HEAD
362+
'
363+
354364
test_done

0 commit comments

Comments
 (0)