From bd2574ca69331d33429f8806ce189b2941e490e7 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Tue, 29 Jul 2008 22:12:22 +0200 Subject: Advertise the ability to abort a commit This treats aborting a commit more like a feature. Signed-off-by: Anders Melchiorsen Signed-off-by: Junio C Hamano --- t/t7502-commit.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 4f2682ea80..f1112639b6 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -142,6 +142,7 @@ test_expect_success 'cleanup commit messages (strip,-F)' ' echo "sample # Please enter the commit message for your changes. +# To abort the commit, use an empty commit message. # (Comment lines starting with '#' will not be included)" >expect test_expect_success 'cleanup commit messages (strip,-F,-e)' ' @@ -149,7 +150,7 @@ test_expect_success 'cleanup commit messages (strip,-F,-e)' ' echo >>negative && { echo;echo sample;echo; } >text && git commit -e -F text -a && - head -n 4 .git/COMMIT_EDITMSG >actual && + head -n 5 .git/COMMIT_EDITMSG >actual && test_cmp expect actual ' @@ -162,7 +163,7 @@ test_expect_success 'author different from committer' ' echo >>negative && git commit -e -m "sample" - head -n 7 .git/COMMIT_EDITMSG >actual && + head -n 8 .git/COMMIT_EDITMSG >actual && test_cmp expect actual ' @@ -181,7 +182,7 @@ test_expect_success 'committer is automatic' ' # must fail because there is no change test_must_fail git commit -e -m "sample" ) && - head -n 8 .git/COMMIT_EDITMSG | \ + head -n 9 .git/COMMIT_EDITMSG | \ sed "s/^# Committer: .*/# Committer:/" >actual && test_cmp expect actual ' -- cgit v1.2.3