From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Erik Sandberg <mandolaerik@gmail.com>, git@vger.kernel.org
Subject: [StGit PATCH 1/2] Test that stg coalesce handles head != top gracefully
Date: Thu, 28 Aug 2008 00:06:49 +0200 [thread overview]
Message-ID: <20080827220649.3607.89509.stgit@yoghurt> (raw)
In-Reply-To: <20080827220606.3607.17134.stgit@yoghurt>
It currently doesn't quite: it will roll back the transaction just
fine, but not before asking the user for a commit message which is
lost in the rollback.
Bug discovered by Erik Sandberg <mandolaerik@gmail.com>:
https://gna.org/bugs/?12204
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
t/t2600-coalesce.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/t/t2600-coalesce.sh b/t/t2600-coalesce.sh
index ef5bf99..33c073d 100755
--- a/t/t2600-coalesce.sh
+++ b/t/t2600-coalesce.sh
@@ -28,4 +28,17 @@ test_expect_success 'Coalesce at stack top' '
[ "$(echo $(stg series --unapplied --noprefix))" = "" ]
'
+cat > editor <<EOF
+#!/bin/sh
+echo "Editor was invoked" | tee editor-invoked
+EOF
+chmod a+x editor
+test_expect_failure 'Coalesce with top != head' '
+ echo blahonga >> foo.txt &&
+ git commit -a -m "a new commit" &&
+ EDITOR=./editor command_error stg coalesce --name=r0 p0 q1 &&
+ test "$(echo $(stg series))" = "+ p0 > q1" &&
+ test ! -e editor-invoked
+'
+
test_done
next prev parent reply other threads:[~2008-08-27 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-27 22:06 [StGit PATCH 0/2] Fix bug 12204 Karl Hasselström
2008-08-27 22:06 ` Karl Hasselström [this message]
2008-08-27 22:06 ` [StGit PATCH 2/2] Check for top == head at the start of every transaction Karl Hasselström
2008-08-30 22:12 ` Catalin Marinas
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=20080827220649.3607.89509.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=mandolaerik@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).