commit: Show author if different from committer
[gitweb.git] / t / t7502-commit.sh
index 284c9412474754be649ccc51df996e3e370ac6ec..0b1db406a78333c771fc293c657c19a7ef1c7fc7 100755 (executable)
@@ -154,6 +154,18 @@ test_expect_success 'cleanup commit messages (strip,-F,-e)' '
 
 '
 
+echo "#
+# Author:    $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>
+#" >> expect
+
+test_expect_success 'author different from committer' '
+
+       echo >>negative &&
+       git commit -e -m "sample"
+       head -n 7 .git/COMMIT_EDITMSG >actual &&
+       test_cmp expect actual
+'
+
 pwd=`pwd`
 cat >> .git/FAKE_EDITOR << EOF
 #! /bin/sh