fix(agents): chain AGENTS git hooks to global core.hooksPath
The local core.hooksPath override set by agents-init shadowed the user's global hooks (ggshield, Git LFS) since git honors only one hooksPath. Each shim now execs the global/system hook of the same name after running version-bump, so global hooks still run after version increment. Bumped the agents-tools version marker to 2 so existing AGENTS repos refresh.
This commit is contained in:
+7
-3
@@ -1148,9 +1148,13 @@ Add -i (interactive confirmation) to destructive commands:
|
||||
every commit: MINOR (resetting PATCH) when the tracked directory set
|
||||
changes, PATCH otherwise; MAJOR is manual-only. A prepare-commit-msg hook
|
||||
appends "(vX.Y.Z)" to the commit subject. Downstream tooling can read
|
||||
AGENTS/.version - a changed MINOR field signals a structure change. The
|
||||
script and hooks are shipped from scripts/agents-tools/ and refreshed when
|
||||
their version marker is stale.
|
||||
AGENTS/.version - a changed MINOR field signals a structure change. Because
|
||||
core.hooksPath is a single setting, the local override would otherwise
|
||||
shadow your global hooks; after bumping the version, each shim chains
|
||||
(execs) to the global/system core.hooksPath hook of the same name so global
|
||||
pre-commit / prepare-commit-msg hooks (e.g. ggshield, Git LFS) still run.
|
||||
The script and hooks are shipped from scripts/agents-tools/ and refreshed
|
||||
when their version marker is stale.
|
||||
|
||||
agents-init
|
||||
agents-init --agents
|
||||
|
||||
Reference in New Issue
Block a user