You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
follow-up: docs/examples/claude-code-hooks/guard-git.sh has drifted far from .claude/hooks/guard-git.sh #2105
Noticed while working on PR #2100 (fix/guard-git-mergehead-skip).
Context:docs/examples/claude-code-hooks/guard-git.sh is meant to be an example copy of .claude/hooks/guard-git.sh, but it has drifted significantly out of sync — missing the -C worktree detection (detect_work_dir), branch-name validation, AI-attribution blocking in commit messages, and now the MERGE_HEAD merge-commit bypass added in PR #2100. A diff between the two files shows the example is missing most of the current hook's logic.
Why out of scope for #2100: the drift predates this PR by many prior PRs/features; fixing it is a separate, standalone doc-sync concern, not something introduced or required by the MERGE_HEAD fix.
Suggested fix: either resync docs/examples/claude-code-hooks/guard-git.sh with the current .claude/hooks/guard-git.sh, or replace the static copy with a build/CI step (or a note) that keeps the example in sync automatically so this doesn't keep drifting.
Activity
fix(hooks): escaped quote inside an executable -c payload hid the rea…
docs(hooks): resync guard-git.sh example with the live hook (#2331)
fix(hooks): guard-git.sh checkout -- block no longer false-positives …
fix(hooks): resync docs/examples/claude-code-hooks with the live hooks (