From fdb3116f0943a23d1345bd7141965c0b32bbb227 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 03:19:19 +0000 Subject: [PATCH] fix: override core.hooksPath locally to enable git hooks in test_hooks.py --- CHANGELOG.md | 2 ++ tests/test_hooks.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a15b12..264e705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +- **Fix `test_hooks.py` regression**: Override `core.hooksPath` locally during git hook installation testing to prevent global configuration (like `/dev/null`) from bypassing the test suite assertions. + ## [0.11.0] — 2026-07-11 Distribution & integration round — reach every agent host, run as a local guardrail, and compose with diff --git a/tests/test_hooks.py b/tests/test_hooks.py index 17e1a92..21e42f5 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -27,6 +27,7 @@ def _init_repo(root: Path) -> None: subprocess.run(["git", "init", "-q"], cwd=root, check=True) subprocess.run(["git", "config", "user.email", "t@example.com"], cwd=root, check=True) subprocess.run(["git", "config", "user.name", "t"], cwd=root, check=True) + subprocess.run(["git", "config", "core.hooksPath", ".git/hooks"], cwd=root, check=True) @unittest.skipUnless(HAVE_GIT, "git not available")