Isolate test suite git commands from ambient global/system git config - #2
Merged
Conversation
mbarbin
commented
Aug 18, 2026
Owner
- Investigation by Claude regarding slowness of the test on my machine
Central_test_helpers.init_repo already isolates the throwaway test repos from the local machine's user.name/user.email, but nothing else: a global commit.gpgsign (blocking on a hardware key or gpg-agent prompt) or a global core.hooksPath (running pre-commit/pre-push hooks) still apply to every commit and push the test suite makes, and can turn an otherwise ~1-2s test run into one that hangs or crawls for reasons that have nothing to do with central itself. Point GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM at /dev/null for the test process - git's documented way to load no config file there. The spawned central.exe subprocess (and any git it shells out to) inherits this process's environment, so this isolates every git invocation the suite makes, not just the ones issued directly. Verified with a fake HOME carrying commit.gpgsign pointed at a slow signer plus a sleeping core.hooksPath hook: one partition (todo.ml) went from 3.28s to 0.32s (~10x) with this change, and dune build @ALL @runtest / @fmt / @lint all still pass clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
mbarbin
force-pushed
the
isolate-test-git-config
branch
from
August 18, 2026 12:58
fc1acdb to
d714fa7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.