Repository navigation
test(project): keep the #1634 scratch repositories' clones off auto-maintenance (#1906) - #1926
Conversation
…aintenance (#1906) - A push to a local path strips GIT_CONFIG_* from receive-pack's environment, so the GIT_CONFIG_COUNT settings two classes applied never reached origin. receive-pack there started a detached `git maintenance run --auto`, whose git 2.55 geometric repack deleted loose objects while checkout()'s local clone copied them ("failed to copy file to ...: No such file or directory"). - ScratchRepository.setUp now points GIT_CONFIG_GLOBAL at a file turning off maintenance.auto, gc.auto, both autoDetach switches and receive.autogc, before its first git command, so every subclass and every receive-pack inherits it; the per-class GIT_CONFIG_COUNT updates are gone. - test_no_git_here_starts_automatic_maintenance runs under each subclass's setUp and asserts from a trace2 log that a commit, pushes and checkout() start no maintenance or gc in any repository. Closes #1906
|
GOOD TO GO at |
|
Coverage: 90.07% (unit tier, Python 3.15,
Per-file detail: the |
|
Further evidence for this fix. #1929's Python 3.15 leg (job 117914902574) hit #1906 again, in |
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeAdded a changelog entry — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657
test— adds or fixes testsA push to a local path starts
receive-packwithGIT_CONFIG_COUNTstripped, so the #1644 maintenance settings never reachedorigin.git. Its auto-maintenance could then repack whilecheckout()cloned locally, and the clone failed with ENOENT (git 2.55,builtin/clone.ccopy_or_link_directory).ScratchRepository.setUpnow writes aGIT_CONFIG_GLOBALfile before any git command runs. It setsmaintenance.auto=false,maintenance.autoDetach=false,gc.auto=0,gc.autoDetach=falseandreceive.autogc=false, and it replaces the per-classGIT_CONFIG_COUNToverrides.A new test runs under every subclass and uses
GIT_TRACE2_EVENTto assert that nomaintenanceorgcprocess starts. It fails without the fix. Under a forced repack on every push, runs went from failing to clean on 2.55.0.Closes #1906