From bb1ae3f6fff19b0a1ab1bb6a815d26d39b9f15e6 Mon Sep 17 00:00:00 2001 From: Santi Béjar Date: Sun, 4 May 2008 18:04:51 +0200 Subject: commit: Show committer if automatic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To warn the user in case he/she might be using an unintended committer identity. Signed-off-by: Santi Béjar Signed-off-by: Junio C Hamano --- t/t7502-commit.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 't/t7502-commit.sh') diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 0b1db406a7..018060c60f 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -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 -- cgit v1.3-5-g9baa