When pre-commit hooks are installed (via "bd hooks install"), daemon auto-sync to sync branches fails with "git commit failed in worktree: exit status 1". Root cause: - gitCommitInWorktree() was missing --no-verify flag - Pre-commit hook runs "bd sync --flush-only" which fails in worktree context - Worktree has .beads directory, triggering hook execution - Hook fails because bd cannot find proper database in worktree path The fix adds --no-verify to git commit in gitCommitInWorktree(), matching the existing implementation in internal/syncbranch/worktree.go line 684. This is correct because: - Worktree commits are internal to bd sync operations - Running pre-commit hooks in worktree context is semantically wrong - The library function already skips hooks for this reason Includes regression test that: - Creates a repo with sync branch configured - Installs a failing pre-commit hook (simulating bd hook behavior) - Verifies commits succeed because --no-verify bypasses the hook - Tests multiple consecutive commits to ensure consistent behavior Tested manually by: 1. Creating issue with "bd create" (triggers mutation event) 2. Verifying daemon logs show successful commit to sync branch 3. Confirming push to remote sync branch completes
9.6 KiB
9.6 KiB