From: Kacper Kornet Date: Sat, 24 Aug 2013 04:01:44 GMT Subject: [PATCH 1/3] Make test "using invalid commit with -C" more strict Message-ID: <1377316906-70338-2-git-send-email-draenog@pld-linux.org> In-Reply-To: <1377316906-70338-1-git-send-email-draenog@pld-linux.org> 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. Fix it by making sure there is always something to commit and git-commit fails because of the invalid commit provided to it. Signed-off-by: Kacper Kornet --- t/t7501-commit.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 99ce36f..699a603 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -53,7 +53,10 @@ test_expect_success PERL 'can use paths with --interactive' ' ' test_expect_success 'using invalid commit with -C' ' - test_must_fail git commit -C bogus + echo bong >file && + git add file && + test_must_fail git commit -C bogus && + git reset ' test_expect_success 'nothing to commit' ' -- 1.8.3.4