3 Commits
Author SHA1 Message Date
christianandClaude Opus 5.5 480ed6a8b2 Install hooks into the repo's own hooks dir, ignoring core.hooksPath
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 00:55:32 +02:00
christianandClaude Opus 5.5 24541f0602 Install hooks by copying into .git/hooks instead of core.hooksPath
Linking core.hooksPath to the tracked, sandbox-writable .githooks/ let a
sandboxed command rewrite a hook that git commit/push then run unsandboxed.
Copies in .git/hooks can't be changed from the sandbox. This also keeps
existing .git/hooks scripts working and lets npm install succeed outside a
git checkout. pre-merge-commit now names itself in errors; hook tests clean
up, ignore GIT_* env and cover the installer; docs state what each layer
does and doesn't stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 00:44:30 +02:00
christianandClaude Opus 5.5 8b08c7b27a Block pushes and commits to main with git hooks
pre-push rejects any push that would update refs/heads/main, however the
command is spelled; pre-commit and pre-merge-commit refuse commits while
main is checked out. npm install enables them via core.hooksPath. The
README documents the three layers of protection for main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 00:39:56 +02:00