fix: git hooks now stage deletions.jsonl for cross-clone propagation
The pre-commit and pre-push hooks were only staging beads.jsonl and issues.jsonl, but not deletions.jsonl. This caused deletions.jsonl to remain untracked after bd cleanup or bd delete operations. Updated all hook locations: - cmd/bd/templates/hooks/pre-commit - cmd/bd/templates/hooks/pre-push - examples/git-hooks/pre-commit - examples/git-hooks/pre-push - .beads-hooks/pre-commit - .beads-hooks/pre-push Users with existing hooks should run: bd hooks install 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -35,9 +35,9 @@ if ! bd sync --flush-only >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Stage both possible JSONL files (backward compatibility)
|
||||
# Stage all tracked JSONL files (beads.jsonl, issues.jsonl for backward compat, deletions.jsonl for deletion propagation)
|
||||
# git add is harmless if file doesn't exist
|
||||
for f in .beads/beads.jsonl .beads/issues.jsonl; do
|
||||
for f in .beads/beads.jsonl .beads/issues.jsonl .beads/deletions.jsonl; do
|
||||
[ -f "$f" ] && git add "$f" 2>/dev/null || true
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user