t7501-commit: Add test for git commit <file> with dirty index.
authorKristian Høgsberg <krh@redhat.com>
Thu, 15 Nov 2007 14:49:58 +0000 (09:49 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 23 Nov 2007 01:05:04 +0000 (17:05 -0800)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7501-commit.sh

index e601028d02de80cf718f9b9567285f12e7468b26..ce83af3a02427af8c6a5fbea921a46ed5522b8b3 100755 (executable)
@@ -257,4 +257,14 @@ test_expect_success 'amend commit to fix author' '
        diff expected current
 
 '
+
+test_expect_success 'git commit <file> with dirty index' '
+       echo tacocat > elif &&
+       echo tehlulz > chz &&
+       git add chz &&
+       git commit elif -m "tacocat is a palindrome" &&
+       git show --stat | grep elif &&
+       git diff --cached | grep chz
+'
+
 test_done