Merge branch 'jk/ident-split-fix' into maint
[gitweb.git] / t / t7501-commit.sh
index 8bb38337a9796142bc091c2b108f7f9e79b0f377..b20ca0eace9dd8f9a11227ebfb932e0446278ea1 100755 (executable)
@@ -30,10 +30,12 @@ test_expect_success 'setup: initial commit' '
 '
 
 test_expect_success '-m and -F do not mix' '
+       git checkout HEAD file && echo >>file && git add file &&
        test_must_fail git commit -m foo -m bar -F file
 '
 
 test_expect_success '-m and -C do not mix' '
+       git checkout HEAD file && echo >>file && git add file &&
        test_must_fail git commit -C HEAD -m illegal
 '
 
@@ -79,7 +81,19 @@ test_expect_success 'empty commit message' '
        test_must_fail git commit -F msg -a
 '
 
+test_expect_success 'template "emptyness" check does not kick in with -F' '
+       git checkout HEAD file && echo >>file && git add file &&
+       git commit -t file -F file
+'
+
+test_expect_success 'template "emptyness" check' '
+       git checkout HEAD file && echo >>file && git add file &&
+       test_must_fail git commit -t file 2>err &&
+       test_i18ngrep "did not edit" err
+'
+
 test_expect_success 'setup: commit message from file' '
+       git checkout HEAD file && echo >>file && git add file &&
        echo this is the commit message, coming from a file >msg &&
        git commit -F msg -a
 '