git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] rebase --autostash: demonstrate a problem with dirty submodules

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 23, 2018, 19:57 UTC
Message-ID
<6d9ff59733e632f69ff414baaaa084dfd461b7e1.1540324633.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.56.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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: https://github.com/git-for-windows/git/issues/1820
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t3420-rebase-autostash.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 0c4eefec7..7eb9f9041 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -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
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 2 of 6 in “Demonstrate and fix a rebase --autostash bug with dirty submodules”
  1. 0/2 Demonstrate and fix a rebase --autostash bug with dirty submodulesJohannes Schindelin via GitGitGadget, Oct 23, 2018
  2. 1/2 rebase --autostash: demonstrate a problem with dirty submodulesJohannes Schindelin via GitGitGadget, Oct 23, 2018
  3. 2/2 rebase --autostash: fix issue with dirty submodulesJohannes Schindelin via GitGitGadget, Oct 23, 2018
  4. Regression in rebase-in-C with rebase.autoStash=trueÆvar Arnfjörð Bjarmason, Nov 6, 2018
  5. Jeff KingNov 6, 2018
  6. Johannes SchindelinNov 7, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.