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

[PATCH v2] rebase -i: test "Nothing to do" case with autostash

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
May 20, 2014, 07:49 UTC
Message-ID
<1400572171-28372-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<CAPig+cSWrc-W+9CZQ9vF-E3xcLY3OFoRMpHLb3K8Vsx3iz1Mjw@mail.gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Eric Sunshine <sunshine@sunshineco.com> writes:
> Simpler (replace above two lines):
>
>     test_set_editor "$(pwd)/abort-editor.sh" &&
Indeed.
And I had debug statements left.
Hopefully, this after-coffee-v2 will be clear enough and correct ;-).
 t/t3420-rebase-autostash.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 90eb264..ff1e2dc 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -167,4 +167,19 @@ testrebase "" .git/rebase-apply
 testrebase " --merge" .git/rebase-merge
 testrebase " --interactive" .git/rebase-merge
 
+test_expect_success 'abort rebase -i with --autostash' '
+	test_when_finished "git reset --hard" &&
+	echo uncommited-content >file0 &&
+	(
+		write_script abort-editor.sh <<-\EOF &&
+			echo > "$1"
+		EOF
+		test_set_editor "$(pwd)/abort-editor.sh" &&
+		test_must_fail git rebase -i --autostash HEAD^ &&
+		rm -f abort-editor.sh
+	) &&
+	echo uncommited-content >expected &&
+	test_cmp expected file0
+'
+
 test_done
-- 
2.0.0.rc3.499.gd6dc9ad
Previous: Eric SunshineNext: Junio C Hamano
Message 4 of 5 in “rebase -i: handle "Nothing to do" case with autostash”
  1. rebase -i: handle "Nothing to do" case with autostashRamkumar Ramachandra, May 19, 2014
  2. rebase -i: test "Nothing to do" case with autostashMatthieu Moy, May 20, 2014
  3. Eric SunshineMay 20, 2014
  4. rebase -i: test "Nothing to do" case with autostashMatthieu Moy, May 20, 2014
  5. Junio C HamanoMay 20, 2014

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.