mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user