fix: add version marker to post-checkout hook and include in CheckGitHooks

The post-checkout hook was missing the bd-hooks-version marker that the other
hooks have, and it wasn't being checked by CheckGitHooks(). This caused
version mismatch issues during hook status checks.

Changes:
- Added 'bd-hooks-version: 0.23.1' marker to post-checkout hook
- Updated CheckGitHooks() to include post-checkout in the list of hooks to check

This ensures all four git hooks (pre-commit, post-merge, pre-push, post-checkout)
have consistent version tracking.

Fixes bd-kb4g

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-09 14:58:03 -08:00
parent ad2154ba66
commit 23fce6ea49
2 changed files with 2 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ type HookStatus struct {
// CheckGitHooks checks the status of bd git hooks in .git/hooks/ // CheckGitHooks checks the status of bd git hooks in .git/hooks/
func CheckGitHooks() ([]HookStatus, error) { func CheckGitHooks() ([]HookStatus, error) {
hooks := []string{"pre-commit", "post-merge", "pre-push"} hooks := []string{"pre-commit", "post-merge", "pre-push", "post-checkout"}
statuses := make([]HookStatus, 0, len(hooks)) statuses := make([]HookStatus, 0, len(hooks))
for _, hookName := range hooks { for _, hookName := range hooks {

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# bd-hooks-version: 0.23.1
# #
# Beads post-checkout hook # Beads post-checkout hook
# Automatically imports JSONL to SQLite database after checking out branches # Automatically imports JSONL to SQLite database after checking out branches