Skip to content

Isolate test suite git commands from ambient global/system git config - #2

Merged
mbarbin merged 1 commit into
mainfrom
isolate-test-git-config
Aug 18, 2026
Merged

Isolate test suite git commands from ambient global/system git config#2
mbarbin merged 1 commit into
mainfrom
isolate-test-git-config

Conversation

@mbarbin

@mbarbin mbarbin commented Aug 18, 2026

Copy link
Copy Markdown
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
mbarbin force-pushed the isolate-test-git-config branch from fc1acdb to d714fa7 Compare August 18, 2026 12:58
@mbarbin
mbarbin merged commit 48d667e into main Aug 18, 2026
10 checks passed
@mbarbin
mbarbin deleted the isolate-test-git-config branch August 18, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant