summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Kristian Høgsberg <krh@redhat.com>2007-11-15 09:49:58 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-22 17:05:04 -0800
commit1200993a1e885fd67d1a1d63da9d2a0e1ee5bcea (patch)
tree78e4d18822cb7a55e46b02966f47cc5dc5ee8981
parentbuiltin-commit: Clean up an unused variable and a debug fprintf(). (diff)
downloadtgif-1200993a1e885fd67d1a1d63da9d2a0e1ee5bcea.tar.xz
t7501-commit: Add test for git commit <file> with dirty index.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7501-commit.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index e601028d02..ce83af3a02 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -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