X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7500-commit.sh;h=aa9c577e9e306bce05cd0fe076c56017c1b97e41;hb=3b65270dcc1fe2d16f055d1a36a29616b9f89141;hp=8eec0fa9bc7278981b9a16571c588ede0a94d341;hpb=b7380fa7a9adb52860eef7e8885fb8bc179beae1;p=git.git diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh index 8eec0fa9b..aa9c577e9 100755 --- a/t/t7500-commit.sh +++ b/t/t7500-commit.sh @@ -150,7 +150,7 @@ EOF test_expect_success '--signoff' ' echo "yet another content *narf*" >> foo && echo "zort" | git commit -s -F - foo && - git cat-file commit HEAD | sed "1,/^$/d" > output && + git cat-file commit HEAD | sed "1,/^\$/d" > output && test_cmp expect output ' @@ -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 >foo && + git add foo && + >empty && + test_must_fail git commit >foo && + git add foo && + git commit --allow-empty-message -m"hello there" && + commit_msg_is "hello there" +' + test_done