From 55540a3d89862689340aa75d1370c3e8151ee934 Mon Sep 17 00:00:00 2001 From: A Date: Mon, 6 Sep 2021 19:12:00 -0700 Subject: [PATCH] * test/lisp/vc/vc-tests.el (vc-test--version-diff): Git env tweak. --- test/lisp/vc/vc-tests.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el index 4169a96670a..aa401a23914 100644 --- a/test/lisp/vc/vc-tests.el +++ b/test/lisp/vc/vc-tests.el @@ -616,9 +616,17 @@ This checks also `vc-backend' and `vc-responsible-backend'." (setq tempdir (make-temp-file "vc-test--version-diff" t) process-environment (cons (format "BZR_HOME=%s" tempdir) process-environment))) + ;; git tries various approaches to guess a user name and email, + ;; which can fail depending on how the system is configured. + ;; Eg if the user account has no GECOS, git commit can fail with + ;; status 128 "fatal: empty ident name". (when (memq backend '(Bzr Git)) (setq process-environment (cons "EMAIL=john@doe.ee" process-environment))) + (if (eq backend 'Git) + (setq process-environment (append '("GIT_AUTHOR_NAME=A" + "GIT_COMMITTER_NAME=C") + process-environment))) (unwind-protect (progn ;; Cleanup. -- 2.39.5