fix(hooks): use bd hooks run instead of nonexistent bd hook in shim templates

The post-checkout, post-merge, and pre-commit shim templates called
bd hook <name> which does not exist as a CLI command. The correct
command is bd hooks run <name> (matching prepare-commit-msg and
pre-push which were already correct). This caused git worktree
creation to fail, blocking gt sling to the beads rig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
mayor 2026-02-22 11:33:25 -08:00 • committed by gastown/crew/george
commit a7e1203e8e
3 changed files with 8 additions and 25 deletions

View file

@ -4,15 +4,9 @@
#
# bd (beads) post-checkout hook - thin shim
#
# This shim delegates to 'bd hook post-checkout' which contains
# This shim delegates to 'bd hooks run post-checkout' which contains
# the actual hook logic. This pattern ensures hook behavior is always
# in sync with the installed bd version - no manual updates needed.
#
# The 'bd hook' command (singular) supports:
# - Guard against frequent firing
# - Per-worktree state tracking
# - Dolt branch-then-merge pattern
# - Hook chaining configuration
# Check if bd is available
if ! command -v bd >/dev/null 2>&1; then
@ -20,4 +14,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi
exec bd hook post-checkout "$@"
exec bd hooks run post-checkout "$@"

View file

@ -4,14 +4,9 @@
#
# bd (beads) post-merge hook - thin shim
#
# This shim delegates to 'bd hook post-merge' which contains
# This shim delegates to 'bd hooks run post-merge' which contains
# the actual hook logic. This pattern ensures hook behavior is always
# in sync with the installed bd version - no manual updates needed.
#
# The 'bd hook' command (singular) supports:
# - Dolt push/pull sync
# - Per-worktree state tracking
# - Hook chaining configuration
# Check if bd is available
if ! command -v bd >/dev/null 2>&1; then
@ -21,4 +16,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi
exec bd hook post-merge "$@"
exec bd hooks run post-merge "$@"

View file

@ -4,15 +4,9 @@
#
# bd (beads) pre-commit hook — thin shim
#
# Delegates to 'bd hook pre-commit' which contains the actual hook logic.
# This pattern ensures hook behavior is always in sync with the installed
# bd version — no manual updates needed.
#
# The 'bd hook' command supports:
# - Per-worktree export state tracking
# - Dolt in-process export (no lock deadlocks)
# - Sync-branch routing
# - Hook chaining configuration
# Delegates to 'bd hooks run pre-commit' which contains the actual hook
# logic. This pattern ensures hook behavior is always in sync with the
# installed bd version — no manual updates needed.
# Check if bd is available
if ! command -v bd >/dev/null 2>&1; then
@ -22,4 +16,4 @@ if ! command -v bd >/dev/null 2>&1; then
exit 0
fi
exec bd hook pre-commit "$@"
exec bd hooks run pre-commit "$@"