From: Karl Hasselström Date: Sun, 21 Sep 2008 12:17:42 +0000 (+0200) Subject: Test that stg coalesce handles head != top gracefully X-Git-Tag: v0.15-rc1~138 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/c539d6250d99e978313fbfaf70ceaf4ebec8dcb7 Test that stg coalesce handles head != top gracefully 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 --- 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