t7501-commit: Add test for git commit <file> with dirty index.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristian Høgsberg committed
Nov 15, 2007 at 09:49 UTC
1200993a1e885fd67d1a1d63da9d2a0e1ee5bcea
1 file changed
+10
t/t7501-commit.sh
+10
@@ -257,4 +257,14 @@ test_expect_success 'amend commit to fix author' '
257
diff expected current
258
259
'
260
+
261
+test_expect_success 'git commit <file> with dirty index' '
262
+ echo tacocat > elif &&
263
+ echo tehlulz > chz &&
264
+ git add chz &&
265
+ git commit elif -m "tacocat is a palindrome" &&
266
+ git show --stat | grep elif &&
267
+ git diff --cached | grep chz
268
+'
269
+
270
test_done