diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2011-05-10 23:12:31 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-11 00:04:00 +0400 |
commit | 02a481fc6aef5d8a52f900448657d1cbe7c963ef (patch) | |
tree | d51980f5ef70634df1027aaeb292164cc6f2cf7e | |
parent | e6b57a8a4ec6c7522facafe30409ecd2d6b181ba (diff) |
Test atomic git-commit --interactive
Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t7501-commit.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index c2fd116d63..73e19c50b0 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" |