aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKévin Le Gouguec2024-03-18 19:47:59 +0100
committerKévin Le Gouguec2024-03-19 21:53:40 +0100
commit014cd0040275bb2a4d08d392825b4814452275db (patch)
treedfa3bd4f9698b34dfa9092e68443f577ffcd2eb3
parent88355de6022458c3e890cc6d5da60d6f35fe8868 (diff)
downloademacs-014cd0040275bb2a4d08d392825b4814452275db.tar.gz
emacs-014cd0040275bb2a4d08d392825b4814452275db.zip
Fix vc-git test when no identities are configured
Reported by john muhl <jm@pub.pink>. * test/lisp/vc/vc-git-tests.el (vc-git-test--with-repo): Set some environment variables (lifted from vc-tests.el) to let 'git commit' compute dummy author and committer identities.
-rw-r--r--test/lisp/vc/vc-git-tests.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el
index fd3e8ccd602..bbf0c4277dd 100644
--- a/test/lisp/vc/vc-git-tests.el
+++ b/test/lisp/vc/vc-git-tests.el
@@ -88,10 +88,17 @@
88 88
89The current directory will be set to the top of that repository; NAME 89The current directory will be set to the top of that repository; NAME
90will be bound to that directory's file name. Once BODY exits, the 90will be bound to that directory's file name. Once BODY exits, the
91directory will be deleted." 91directory will be deleted.
92
93Some dummy environment variables will be set for the duration of BODY to
94allow 'git commit' to determine identities for authors and committers."
92 (declare (indent 1)) 95 (declare (indent 1))
93 `(ert-with-temp-directory ,name 96 `(ert-with-temp-directory ,name
94 (let ((default-directory ,name)) 97 (let ((default-directory ,name)
98 (process-environment (append '("EMAIL=john@doe.ee"
99 "GIT_AUTHOR_NAME=A"
100 "GIT_COMMITTER_NAME=C")
101 process-environment)))
95 (vc-create-repo 'Git) 102 (vc-create-repo 'Git)
96 ,@body))) 103 ,@body)))
97 104