LibreChat/.husky
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
..
lint-staged.config.js 🎨 chore: Enforce Design-System Rules With @shadcn/lint (#15981) 2026-10-01 03:46:16 +00:00
pre-commit 🎨 chore: Enforce Design-System Rules With @shadcn/lint (#15981) 2026-10-01 03:46:16 +00:00
pre-push 🪤 fix: Keep the Pre-Push Hook's Git Environment Away From Its Checks (#17798) 2026-11-04 21:18:05 +01:00