summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-05-09 05:36:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-09 05:36:31 (GMT)
commitea28baed79981e065a5a6d39323c4fb7d2b51685 (patch)
tree0f905b3224b376dbb092f36407311fdd6954884d /t
parent301c4f970913fc52be7a6b667fb5a4945e9276d0 (diff)
parentc9b5fde7593ac88b1c475bea51d21ba1a1d57d65 (diff)
downloadgit-ea28baed79981e065a5a6d39323c4fb7d2b51685.zip
git-ea28baed79981e065a5a6d39323c4fb7d2b51685.tar.gz
git-ea28baed79981e065a5a6d39323c4fb7d2b51685.tar.bz2
Merge branch 'ab/commit-empty-message'
* ab/commit-empty-message: Add option to git-commit to allow empty log messages
Diffstat (limited to 't')
-rwxr-xr-xt/t7500-commit.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh
index 9f5c3ed..aa9c577 100755
--- a/t/t7500-commit.sh
+++ b/t/t7500-commit.sh
@@ -193,4 +193,26 @@ test_expect_success 'commit -F overrides -t' '
commit_msg_is "-F log"
'
+test_expect_success 'Commit without message is allowed with --allow-empty-message' '
+ echo "more content" >>foo &&
+ git add foo &&
+ >empty &&
+ git commit --allow-empty-message <empty &&
+ commit_msg_is ""
+'
+
+test_expect_success 'Commit without message is no-no without --allow-empty-message' '
+ echo "more content" >>foo &&
+ git add foo &&
+ >empty &&
+ test_must_fail git commit <empty
+'
+
+test_expect_success 'Commit a message with --allow-empty-message' '
+ echo "even more content" >>foo &&
+ git add foo &&
+ git commit --allow-empty-message -m"hello there" &&
+ commit_msg_is "hello there"
+'
+
test_done