From: Conrad Irwin Date: Tue, 10 May 2011 19:12:31 +0000 (-0700) Subject: Test atomic git-commit --interactive X-Git-Tag: v1.7.6-rc0~64^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02a481fc6aef5d8a52f900448657d1cbe7c963ef;p=git.git Test atomic git-commit --interactive Signed-off-by: Conrad Irwin Helped-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index c2fd116d6..73e19c50b 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -133,6 +133,16 @@ test_expect_success PERL \ "interactive add" \ "echo 7 | git commit --interactive | grep 'What now'" +test_expect_success PERL \ + "commit --interactive doesn't change index if editor aborts" \ + "echo zoo >file && + test_must_fail git diff --exit-code >diff1 && + (echo u ; echo '*' ; echo q) | + (EDITOR=: && export EDITOR && + test_must_fail git commit --interactive) && + git diff >diff2 && + test_cmp diff1 diff2" + test_expect_success \ "showing committed revisions" \ "git rev-list HEAD >current"