X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7500-commit.sh;h=aa9c577e9e306bce05cd0fe076c56017c1b97e41;hb=127f04522292fc62152762405c92d6acca4dbcb5;hp=9f5c3edb0392c321092e56e2bf46fd096f74cf75;hpb=e8a12280530f16bf2089999ceefe35794d115d07;p=git.git diff --git a/t/t7500-commit.sh b/t/t7500-commit.sh index 9f5c3edb0..aa9c577e9 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 >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