aboutsummaryrefslogtreecommitdiff
path: root/t/t7502-commit.sh
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2008-05-04 18:04:50 +0200
committerJunio C Hamano <gitster@pobox.com>2008-05-06 16:43:52 -0700
commite83dbe802f24e017f2e3889272a70793c064d984 (patch)
treeb93e4375b4b630101faa7afb072a1467a3f87205 /t/t7502-commit.sh
parenta45d46ba72a8be16eeb30f608620bac7d9296803 (diff)
downloadgit-e83dbe802f24e017f2e3889272a70793c064d984.tar.gz
git-e83dbe802f24e017f2e3889272a70793c064d984.tar.xz
commit: Show author if different from committer
That would help reassure anybody while committing other's changes. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-xt/t7502-commit.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 284c94124..0b1db406a 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -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