mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-04 05:48:43 +08:00
fix(hooks): clear repository git environment for tests
Signed-off-by: Brian McNaboe <bmcnaboe@gmail.com>
This commit is contained in:
@@ -17,4 +17,13 @@ echo "pre-commit: security audit (source-level)..."
|
||||
scripts/security-audit.sh
|
||||
|
||||
echo "pre-commit: building and running tests..."
|
||||
make -j$(sysctl -n hw.ncpu 2>/dev/null || nproc) -f Makefile.cbm test
|
||||
(
|
||||
# Git exports repository-local variables to hooks. The test suite creates
|
||||
# independent repositories and linked worktrees, so keep the commit's
|
||||
# index and object paths out of those fixtures.
|
||||
while IFS= read -r variable; do
|
||||
unset "$variable"
|
||||
done < <(git rev-parse --local-env-vars)
|
||||
|
||||
make -j"$(sysctl -n hw.ncpu 2>/dev/null || nproc)" -f Makefile.cbm test
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user