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>
7 lines
331 B
Bash
Executable File
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"
|