]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/vc/vc-tests.el (vc-test--version-diff): Git env tweak.
authorA <rgm@gnu.org>
Tue, 7 Sep 2021 02:12:00 +0000 (19:12 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 7 Sep 2021 02:12:30 +0000 (19:12 -0700)
test/lisp/vc/vc-tests.el

index 4169a96670a5e3d34d4ebc12152fac8dbe7a4912..aa401a23914d6fc1204637164202e296967ed69d 100644 (file)
@@ -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.