Commit graph

2 commits

Author SHA1 Message Date
Marco Beretta
6adb4899c7
🪤 fix: Keep the Pre-Push Hook's Git Environment Away From Its Checks (#17798)
* fix: Keep the Pre-Push Hook's Git Environment Away From Its Checks

Git exports GIT_DIR to hooks, absolute in a linked worktree, and the hook passed
it to the static checks. scripts/imports.test.mts builds scratch repositories
with git init, add and commit, so under a push those ran against the pushing
worktree: two fixture commits on the branch, its index replaced, and core.bare
set in the shared config.

The hook now unsets everything git rev-parse --local-env-vars lists before any
child runs. The imports suite clears GIT_* for itself as well, because the
pre-commit hook reaches it with STATIC_CHECKS_FULL=1.

* test: Cover the Hook's Git Environment Scrub in the Pre-Push Scenarios
2026-11-04 21:18:05 +01:00
Marco Beretta
e10c4f26ab
🔎 perf: Read Dependency Usage From Source Files Only in Static Checks (#17767) 2026-11-04 11:25:00 +01:00