git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: ether@cpan.org, felipe.contreras@gmail.com,
	philippe.vaucher@gmail.com, artagnon@gmail.com,
	Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] rebase -i: test "Nothing to do" case with autostash
Date: Tue, 20 May 2014 08:55:13 +0200	[thread overview]
Message-ID: <1400568913-1340-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1400537120-9995-1-git-send-email-artagnon@gmail.com>

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Ram's patch lacks a test. Here it is. Fails without Ram's patch, and
passes with it.

Can be squashed into Ram's patch.

 t/t3420-rebase-autostash.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
index 90eb264..c2e9a4c 100755
--- a/t/t3420-rebase-autostash.sh
+++ b/t/t3420-rebase-autostash.sh
@@ -167,4 +167,21 @@ testrebase "" .git/rebase-apply
 testrebase " --merge" .git/rebase-merge
 testrebase " --interactive" .git/rebase-merge
 
+test_expect_success 'Abort rebase with --autostash' '
+	git log &&
+	echo new-content >file0 &&
+	(
+		write_script abort-editor.sh <<-\EOF &&
+			echo > "$1"
+		EOF
+		GIT_EDITOR=\"$(pwd)/abort-editor.sh\" &&
+		export GIT_EDITOR &&
+		test_must_fail git rebase -i --autostash HEAD^ &&
+		rm -f abort-editor.sh
+	) &&
+	git status &&
+	echo new-content >expected &&
+	test_cmp expected file0
+'
+
 test_done
-- 
2.0.0.rc3.499.gd6dc9ad

  reply	other threads:[~2014-05-20  6:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 22:05 [PATCH] rebase -i: handle "Nothing to do" case with autostash Ramkumar Ramachandra
2014-05-20  6:55 ` Matthieu Moy [this message]
2014-05-20  7:22   ` [PATCH] rebase -i: test " Eric Sunshine
2014-05-20  7:49     ` [PATCH v2] " Matthieu Moy
2014-05-20 18:34       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400568913-1340-1-git-send-email-Matthieu.Moy@imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=artagnon@gmail.com \
    --cc=ether@cpan.org \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=philippe.vaucher@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).