Web lists-archives.com

[PATCH v2 2/2] tests: add test for separate author and committer idents




Signed-off-by: William Hubbs <williamh@xxxxxxxxxx>
---
 t/t7517-per-repo-email.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/t/t7517-per-repo-email.sh b/t/t7517-per-repo-email.sh
index 231b8cc19d..06c7c0fb78 100755
--- a/t/t7517-per-repo-email.sh
+++ b/t/t7517-per-repo-email.sh
@@ -85,4 +85,21 @@ test_expect_success REBASE_P \
 	test_must_fail git rebase -p master
 '
 
+test_expect_success \
+	'author and committer config settings override user config settings' '
+	sane_unset GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL &&
+	sane_unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL &&
+	git config user.name user &&
+	git config user.email user@xxxxxxxxxxx &&
+	git config author.name author &&
+	git config author.email author@xxxxxxxxxxx &&
+	git config committer.name committer &&
+	git config committer.email committer@xxxxxxxxxxx &&
+	test_commit config-names &&
+	[ "$(git log --format=%an -1)" = "author" ] &&
+	[ "$(git log --format=%ae -1)" = "author@xxxxxxxxxxx" ] &&
+	[ "$(git log --format=%cn -1)" = "committer" ] &&
+	[ "$(git log --format=%ce -1)" = "committer@xxxxxxxxxxx" ]
+'
+
 test_done
-- 
2.19.2