merge-recursive: do not clobber untracked working tree garbage
[gitweb.git] / t / t7500-commit.sh
index d89f91a6fb7fa12d41cc4a346829bff7cbd3e76b..0fe745ea0dbfda5e72ee9ef1df0b32245812e268 100755 (executable)
@@ -3,7 +3,7 @@
 # Copyright (c) 2007 Steven Grimm
 #
 
-test_description='git-commit
+test_description='git commit
 
 Tests for selected commit options.'
 
@@ -138,4 +138,33 @@ test_expect_success '--signoff' '
        diff expect output
 '
 
+test_expect_success 'commit message from file (1)' '
+       mkdir subdir &&
+       echo "Log in top directory" >log &&
+       echo "Log in sub directory" >subdir/log &&
+       (
+               cd subdir &&
+               git commit --allow-empty -F log
+       ) &&
+       commit_msg_is "Log in sub directory"
+'
+
+test_expect_success 'commit message from file (2)' '
+       rm -f log &&
+       echo "Log in sub directory" >subdir/log &&
+       (
+               cd subdir &&
+               git commit --allow-empty -F log
+       ) &&
+       commit_msg_is "Log in sub directory"
+'
+
+test_expect_success 'commit message from stdin' '
+       (
+               cd subdir &&
+               echo "Log with foo word" | git commit --allow-empty -F -
+       ) &&
+       commit_msg_is "Log with foo word"
+'
+
 test_done