Code

Merge branch 'lh/submodule-tree-traversal' (early part)
[git.git] / t / t7502-commit.sh
index f1112639b698faca38b2c8fc743e422d14dc15f6..ad42c78d7c21497a6ebb4e9cef4efd6334f947da 100755 (executable)
@@ -89,6 +89,14 @@ test_expect_success 'verbose' '
 
 '
 
+test_expect_success 'verbose respects diff config' '
+
+       git config color.diff always &&
+       git status -v >actual &&
+       grep "\[1mdiff --git" actual &&
+       git config --unset color.diff
+'
+
 test_expect_success 'cleanup commit messages (verbatim,-t)' '
 
        echo >>negative &&
@@ -141,16 +149,15 @@ test_expect_success 'cleanup commit messages (strip,-F)' '
 
 echo "sample
 
-# Please enter the commit message for your changes.
-# To abort the commit, use an empty commit message.
-# (Comment lines starting with '#' will not be included)" >expect
+# Please enter the commit message for your changes. Lines starting
+# with '#' will be ignored, and an empty message aborts the commit." >expect
 
 test_expect_success 'cleanup commit messages (strip,-F,-e)' '
 
        echo >>negative &&
        { echo;echo sample;echo; } >text &&
        git commit -e -F text -a &&
-       head -n 5 .git/COMMIT_EDITMSG >actual &&
+       head -n 4 .git/COMMIT_EDITMSG >actual &&
        test_cmp expect actual
 
 '
@@ -163,7 +170,7 @@ test_expect_success 'author different from committer' '
 
        echo >>negative &&
        git commit -e -m "sample"
-       head -n 8 .git/COMMIT_EDITMSG >actual &&
+       head -n 7 .git/COMMIT_EDITMSG >actual &&
        test_cmp expect actual
 '
 
@@ -182,7 +189,7 @@ test_expect_success 'committer is automatic' '
                # must fail because there is no change
                test_must_fail git commit -e -m "sample"
        ) &&
-       head -n 9 .git/COMMIT_EDITMSG | \
+       head -n 8 .git/COMMIT_EDITMSG | \
        sed "s/^# Committer: .*/# Committer:/" >actual &&
        test_cmp expect actual
 '