From 4d9814a62576c63bd5c38696e5e7bc2bdb42062c Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sat, 31 Oct 2026 22:28:17 +0800 Subject: [PATCH] fix: ignore global git config in sitemap lastmod test commits The sitemap lastmod test failed wherever the global git config enabled commit signing with an unreachable key, because the test strips every GIT_* variable and so dropped any override that disabled signing. Co-Authored-By: Claude --- website/tests/test_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/tests/test_build.py b/website/tests/test_build.py index 4fca37f5..2ecdc166 100644 --- a/website/tests/test_build.py +++ b/website/tests/test_build.py @@ -250,7 +250,7 @@ class TestBuild: self._make_repo(tmp_path, readme) def commit(day, message): - env = {**os.environ, "GIT_AUTHOR_DATE": f"{day}T12:00:00Z", "GIT_COMMITTER_DATE": f"{day}T12:00:00Z"} + env = {**os.environ, "GIT_CONFIG_GLOBAL": "/dev/null", "GIT_AUTHOR_DATE": f"{day}T12:00:00Z", "GIT_COMMITTER_DATE": f"{day}T12:00:00Z"} subprocess.run(["git", "add", "-A"], cwd=tmp_path, check=True) subprocess.run(["git", "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", message], cwd=tmp_path, env=env, check=True)