]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7502-commit.sh
commit: Show committer if automatic
[thirdparty/git.git] / t / t7502-commit.sh
index 0b1db406a78333c771fc293c657c19a7ef1c7fc7..018060c60f590946c8e02181bfb1f572972bb787 100755 (executable)
@@ -166,6 +166,21 @@ test_expect_success 'author different from committer' '
        test_cmp expect actual
 '
 
+sed -i '$d' expect
+echo "# Committer:
+#" >> expect
+unset GIT_COMMITTER_EMAIL
+unset GIT_COMMITTER_NAME
+
+test_expect_success 'committer is automatic' '
+
+       echo >>negative &&
+       git commit -e -m "sample"
+       head -n 8 .git/COMMIT_EDITMSG | \
+       sed "s/^# Committer: .*/# Committer:/" >actual &&
+       test_cmp expect actual
+'
+
 pwd=`pwd`
 cat >> .git/FAKE_EDITOR << EOF
 #! /bin/sh