Files
clide/.githooks/post-checkout
T
jpmschweitzerandClaude Opus 4.8 008779cb1e make post-checkout hook tolerant of fresh worktrees
The pql post-checkout hook unconditionally sourced .pql/hooks/post-checkout
from the worktree toplevel, which doesn't exist in a fresh `git worktree add`
— aborting the checkout. Guard on the file existing so worktree creation
(used by parallel agent workflows) no longer fails.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 16:24:18 +02:00

7 lines
331 B
Bash
Executable File

#!/bin/sh
# pql: source .pql/hooks/post-checkout (rebuild pql.db on branch checkout).
# Guard on existence so a fresh `git worktree add` — whose toplevel has no
# .pql/hooks yet — doesn't abort the checkout (the hook is best-effort).
hook="$(git rev-parse --show-toplevel)/.pql/hooks/post-checkout"
[ -f "$hook" ] && . "$hook"