commit: Show committer if automatic

To warn the user in case he/she might be using an unintended
committer identity.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Santi Béjar
2008-05-04 18:04:51 +02:00
committed by Junio C Hamano
parent e83dbe802f
commit bb1ae3f6ff
6 changed files with 40 additions and 3 deletions

View File

@ -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