summaryrefslogtreecommitdiff
path: root/t/t7502-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-xt/t7502-commit.sh15
1 files changed, 15 insertions, 0 deletions
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