Make test "using invalid commit with -C" more strict
authorKacper Kornet <draenog@pld-linux.org>
Sat, 24 Aug 2013 04:01:44 +0000 (06:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Aug 2013 06:58:43 +0000 (23:58 -0700)
In the test 'using invalid commit with -C' git-commit would have failed
even if the -C option had been given the correct commit, as there was
nothing to commit. Pass --allow-empty to make sure it would make a commit,
were there no issues with the argument given to the -C option.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7501-commit.sh
index 99ce36f5ef91ae91c0f2ebd02ae70c4cba4c937c..f04798f87232fbbf705dd8a24300a76a2a6e435a 100755 (executable)
@@ -53,7 +53,7 @@ test_expect_success PERL 'can use paths with --interactive' '
 '
 
 test_expect_success 'using invalid commit with -C' '
-       test_must_fail git commit -C bogus
+       test_must_fail git commit --allow-empty -C bogus
 '
 
 test_expect_success 'nothing to commit' '