Skip to content

Commit

Permalink
rebase --autostash: demonstrate a problem with dirty submodules
Browse files Browse the repository at this point in the history
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: #1820

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Nov 15, 2018
1 parent 9001cce commit 5a4dc1e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/t3420-rebase-autostash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5a4dc1e

Please sign in to comment.