From a7e1203e8ef24dcdfc97f84c8e454a9107290f76 Mon Sep 17 00:00:00 2001 From: mayor Date: Sun, 22 Feb 2026 11:33:25 -0800 Subject: [PATCH] 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 which does not exist as a CLI command. The correct command is bd hooks run (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 --- cmd/bd/templates/hooks/post-checkout | 10 ++-------- cmd/bd/templates/hooks/post-merge | 9 ++------- cmd/bd/templates/hooks/pre-commit | 14 ++++---------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/cmd/bd/templates/hooks/post-checkout b/cmd/bd/templates/hooks/post-checkout index 2c77d81b7..49b77071b 100755 --- a/cmd/bd/templates/hooks/post-checkout +++ b/cmd/bd/templates/hooks/post-checkout @@ -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 "$@" diff --git a/cmd/bd/templates/hooks/post-merge b/cmd/bd/templates/hooks/post-merge index 85536e6fd..a5f4d962a 100755 --- a/cmd/bd/templates/hooks/post-merge +++ b/cmd/bd/templates/hooks/post-merge @@ -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 "$@" diff --git a/cmd/bd/templates/hooks/pre-commit b/cmd/bd/templates/hooks/pre-commit index 438b6aa1c..2f1a17d40 100755 --- a/cmd/bd/templates/hooks/pre-commit +++ b/cmd/bd/templates/hooks/pre-commit @@ -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 "$@"