OSDN Git Service

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 e601028..ce83af3 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