When git pull encounters merge conflicts in .beads/beads.jsonl, the post-merge hook runs 'bd sync --import-only' which previously failed with an error message pointing users to manual resolution. This commit adds automatic 3-way merge resolution as a fallback safety net that works alongside the git merge driver. Changes: - Modified conflict detection in import.go to attempt automatic merge - Added attemptAutoMerge() function that: - Extracts git conflict stages (:1 base, :2 ours, :3 theirs) - Invokes 'bd merge' command for intelligent field-level merging - Writes merged result back and auto-stages the file - Restarts import with merged JSONL on success - Falls back to manual resolution instructions only if auto-merge fails Defense-in-depth approach: 1. Primary: git merge driver prevents most conflicts during merge 2. Fallback: import auto-merge handles any that slip through 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
21 KiB
21 KiB