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:
committed by
Junio C Hamano
parent
e83dbe802f
commit
bb1ae3f6ff
@ -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
|
||||
|
||||
Reference in New Issue
Block a user