From 776f0a75bfc371aaf78924730dab3c0fe54a1c56 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Tue, 8 Feb 2022 11:49:07 +0100 Subject: [PATCH] alr.py: ensure baseline git configuration in tests --- testsuite/drivers/alr.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testsuite/drivers/alr.py b/testsuite/drivers/alr.py index 00a4bc12f..a2ec8b7f5 100644 --- a/testsuite/drivers/alr.py +++ b/testsuite/drivers/alr.py @@ -34,6 +34,12 @@ def prepare_env(config_dir, env): This creates the `config_dir` directory and updates `env` (environment variables) to point to it as alr's configuration directory. """ + + # Disable any user's git configuration to ensure reproducible git behavior. + # https://github.com/git/git/commit/4179b4897f2de28858acaebd6382c06c91532e98 + env["GIT_CONFIG_GLOBAL"] = "/dev/null" + env["GIT_CONFIG_SYSTEM"] = "/dev/null" + config_dir = os.path.abspath(config_dir) mkdir(config_dir) env['ALR_CONFIG'] = config_dir