From c539d6250d99e978313fbfaf70ceaf4ebec8dcb7 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 21 Sep 2008 14:17:42 +0200 Subject: [PATCH] Test that stg coalesce handles head != top gracefully MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Organization: Straylight/Edgeware From: Karl Hasselström 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 : https://gna.org/bugs/?12204 Signed-off-by: Karl Hasselström --- t/t2600-coalesce.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 <> 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 -- [mdw]