share .pql/hooks/ across clones
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>
This commit is contained in:
@@ -98,3 +98,6 @@ legacy/**/.coverage.*
|
||||
|
||||
# frame0-wireframe local ID ↔ Frame0 ID mapping; per-machine state.
|
||||
*.idmap.json
|
||||
.pql/*
|
||||
!.pql/pql-plan.json
|
||||
!.pql/hooks/
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/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 ---
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# --- pql plan export ---
|
||||
# Auto-installed by pql init. Exports planning state so it's
|
||||
# committed alongside code changes. Safe no-op if pql is absent.
|
||||
if command -v pql >/dev/null 2>&1; then
|
||||
pql plan export 2>/dev/null
|
||||
if ! git diff --quiet -- .pql/pql-plan.json 2>/dev/null; then
|
||||
git add .pql/pql-plan.json
|
||||
fi
|
||||
fi
|
||||
# --- end pql ---
|
||||
+264
-194
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user