fix: Correct git merge driver placeholders from %L/%R to %A/%B
Git merge drivers only support three placeholders: - %O (ancestor/base) - %A (current version) - %B (other branch's version) The code was incorrectly using %L and %R, which don't exist in git, causing them to be passed through literally and breaking JSONL merges. Changes: - Fixed merge driver config in init.go, merge.go, README.md, docs - Added detection in bd doctor with clear error messages - Added auto-fix in bd doctor --fix - Added proactive warning in bd sync before git pull - Added reactive error detection after merge failures - Updated all tests to use correct placeholders Now users get helpful guidance at every step: 1. bd doctor detects the issue 2. bd doctor --fix auto-corrects it 3. bd sync warns before pulling if misconfigured 4. Error messages suggest bd doctor --fix when merge fails 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -156,7 +156,7 @@ echo "BEFORE ANYTHING ELSE: run 'bd onboard' and follow the instructions" >> AGE
|
||||
|
||||
**Git merge driver:** During `bd init`, beads configures git to use `bd merge` for intelligent JSONL merging. This prevents conflicts when multiple branches modify issues. Skip with `--skip-merge-driver` if needed. To configure manually later:
|
||||
```bash
|
||||
git config merge.beads.driver "bd merge %A %O %L %R"
|
||||
git config merge.beads.driver "bd merge %A %O %A %B"
|
||||
git config merge.beads.name "bd JSONL merge driver"
|
||||
echo ".beads/beads.jsonl merge=beads" >> .gitattributes
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user