aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2024-06-25 10:52:47 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-06-25 21:08:21 +0200
commitb5aa1afc40ab9573efa0ea42f716baf80e65abe1 (patch)
tree9a4f50d86416330e93e3960d12a51fcd4ced6bb6
parentbf8bc11937f159e8847fea73e0308ae1ffb43cca (diff)
test: Set/override committer information as well
`magit-with-test-directory' adds "GIT_AUTHOR_NAME" and "GIT_AUTHOR_EMAIL" to the environment, but these are not used for the committer information. No environment variables exist, which set both the author and committer information. Additionally using "GIT_COMMITTER_NAME" and "GIT_COMMITTER_EMAIL" would be an option. However, config variables that set author and committer information in one go do exit. So set "user.name" and "user.email" using the "-c" argument.
-rw-r--r--test/magit-tests.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/magit-tests.el b/test/magit-tests.el
index 310a3b1..e47d32f 100644
--- a/test/magit-tests.el
+++ b/test/magit-tests.el
@@ -37,12 +37,11 @@
(declare (indent 0) (debug t))
(let ((dir (make-symbol "dir")))
`(let ((,dir (file-name-as-directory (make-temp-file "magit-" t)))
- (process-environment process-environment)
(magit-git-global-arguments
(nconc (list "-c" "protocol.file.allow=always")
+ (list "-c" "user.name=\"A U Thor\"")
+ (list "-c" "user.email=\"a.u.thor@example.com\"")
magit-git-global-arguments)))
- (push "GIT_AUTHOR_NAME=A U Thor" process-environment)
- (push "GIT_AUTHOR_EMAIL=a.u.thor@example.com" process-environment)
(condition-case err
(cl-letf (((symbol-function #'message) (lambda (&rest _))))
(let ((default-directory (file-truename ,dir)))