From 62e494de8ef90f3cda9e69257bc908886bfd7351 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 28 Nov 2026 16:39:10 -0700 Subject: [PATCH] Tests: no background git upkeep in test projects The setup commit started a detached git gc that pruned the tripwires test's fake .git/worktrees folders later under load (7 of 16 runs failed with four loops at once; 0 of 40 after). Co-Authored-By: Claude Fable 5.2 --- tests/test_core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index 4d2fc9b..0487296 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -75,7 +75,9 @@ class Core(unittest.TestCase): def project(self, name): path = os.path.join(self.tmp, name) os.makedirs(path) - for args in (["init", "-q"], ["-c", "user.name=t", "-c", "user.email=t@t", "commit", "-q", "--allow-empty", "-m", "start"]): + # no background upkeep: the commit starts a detached `git gc`, which prunes a test's fake .git/worktrees folders later, under load + for args in (["init", "-q"], ["config", "gc.auto", "0"], ["config", "maintenance.auto", "false"], + ["-c", "user.name=t", "-c", "user.email=t@t", "commit", "-q", "--allow-empty", "-m", "start"]): subprocess.run(["git"] + args, cwd=path, check=True, capture_output=True) return path