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:
@@ -128,7 +128,7 @@ git commit
|
||||
|
||||
```bash
|
||||
# These are configured automatically:
|
||||
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"
|
||||
|
||||
# .gitattributes entry added:
|
||||
@@ -140,7 +140,7 @@ git config merge.beads.name "bd JSONL merge driver"
|
||||
**If you skipped merge driver with `--skip-merge-driver`:**
|
||||
|
||||
```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