mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
fix(hooks): move the merge-signature gate off prepare-commit-msg
git commit --no-verify skips pre-commit and commit-msg, but not prepare-commit-msg. The gate sat on that stage, so the pre-commit framework ran on every commit regardless and did its stash-unstaged dance. Inside the agent sandbox its rollback (git checkout -- .) cannot unlink the bind-mounted .claude/settings.json, aborts mid-restore, and leaves every unstaged change reverted to HEAD -- twelve files of work, no commit created. The gate itself is harmless: merge_signed.sh returns 0 immediately without a MERGE_HEAD. Only the stage was wrong. On commit-msg it still runs for a normal merge commit, and --no-verify now behaves as documented. Tradeoff: a merge committed with --no-verify skips the signature check, same as it already skips make test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d0dd127f37
commit
fd00a522ac
2 files changed
+3
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
---
|
||||
default_install_hook_types:
|
||||
- pre-commit
|
||||
- prepare-commit-msg
|
||||
- commit-msg
|
||||
- pre-push
|
||||
- post-checkout
|
||||
|
||||
@@ -22,7 +22,7 @@ repos:
|
||||
pass_filenames: false
|
||||
always_run: true
|
||||
stages:
|
||||
- prepare-commit-msg
|
||||
- commit-msg
|
||||
- id: make-lint
|
||||
name: Run make lint (pre-push gate)
|
||||
entry: make lint
|
||||
|
||||
@@ -745,7 +745,7 @@ test-main-merged:
|
||||
@bash scripts/git/assert/main_merged.sh
|
||||
|
||||
.PHONY: test-merge-signed
|
||||
# Verify every commit an in-progress merge brings in (HEAD..MERGE_HEAD) is signed (prepare-commit-msg gate).
|
||||
# Verify every commit an in-progress merge brings in (HEAD..MERGE_HEAD) is signed (commit-msg gate).
|
||||
test-merge-signed:
|
||||
@bash scripts/git/assert/merge_signed.sh
|
||||
|
||||
|
||||
Reference in new issue
Block a user