feat: add bd doctor --check-health for lightweight git hook health checks
- Add --check-health flag for quick, silent health checks (exit 0 on success) - Check version mismatch (CLI vs database), sync.branch config, outdated hooks - Add hints.doctor config option to suppress doctor hints globally - Update post-merge/post-checkout hooks to call bd doctor --check-health - Suggest running bd doctor in upgrade notification - Modernize post-checkout hook (bash→sh, use bd sync instead of bd import) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,12 @@ if ! output=$(bd sync --import-only 2>&1); then
|
||||
echo "Warning: Failed to sync bd changes after merge" >&2
|
||||
echo "$output" >&2
|
||||
echo "" >&2
|
||||
echo "Run 'bd sync --import-only' manually to resolve" >&2
|
||||
echo "Run 'bd doctor --fix' to diagnose and repair" >&2
|
||||
# Don't fail the merge, just warn
|
||||
fi
|
||||
|
||||
# Run quick health check (silent on success, hints if issues found)
|
||||
# This catches version mismatches, outdated hooks, etc.
|
||||
bd doctor --check-health 2>/dev/null || true
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user