summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-09-17 10:04:36 +0200
committerLudovic Courtès <ludo@gnu.org>2021-09-18 19:37:44 +0200
commit4674738cdbcb5d793fd19d6d4941721adbddad5a (patch)
treeabacad45f8ad2d6b5b0116b5c019b1354f2a9402
parent358ad74f41a59b177c9961abf49753a7ce3f41a0 (diff)
tests: git: Don't read from the users global Git config file.
* guix/tests/git (populate-git-repository): Set the GIT_CONFIG_GLOBAL environment variable to the temporary Git config file. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/tests/git.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index b8e5f7e643..e11541e83b 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,6 +54,7 @@ Return DIRECTORY on success."
(with-environment-variables
`(("GIT_CONFIG_NOSYSTEM" "1")
("GIT_ATTR_NOSYSTEM" "1")
+ ("GIT_CONFIG_GLOBAL" ,(string-append home "/.gitconfig"))
("HOME" ,home))
(apply invoke (git-command) "-C" directory
command args)))))