The pql plan auto-export (pre-commit) and auto-import (post-merge) hooks were previously gitignored as part of `.pql/*`. Allowing the hooks directory to be committed means a fresh clone gets the planning-state sync without needing to run `pql init` first — pql plan snapshots stay current on push and absorb changes on pull the same way for every contributor. Co-Authored-By: Claude <noreply@anthropic.com>
12 lines
394 B
Bash
Executable File
12 lines
394 B
Bash
Executable File
#!/bin/sh
|
|
# --- pql plan import ---
|
|
# Auto-installed by pql init. Imports planning state when the
|
|
# snapshot file changes on pull/merge. Safe no-op if pql is absent.
|
|
if command -v pql >/dev/null 2>&1; then
|
|
changed=$(git diff-tree -r --name-only ORIG_HEAD HEAD -- .pql/pql-plan.json 2>/dev/null)
|
|
if [ -n "$changed" ]; then
|
|
pql plan import 2>/dev/null
|
|
fi
|
|
fi
|
|
# --- end pql ---
|