computer-science
Weave: Merging based on language structure and not lines
Key takeaways
- Two agents edit different functions in the same file?
- # Two agents edited different functions $ git merge feature-b CONFLICT (content): Merge conflict in src/lib.ts Automatic merge failed. # Git sees overlapping lines. # The functions don't actually overlap.
- Parses code with tree-sitter, merges by function and class.
Entity-level semantic merge driver for Git. Two agents edit different functions in the same file? Clean merge. Every time.
# Two agents edited different functions $ git merge feature-b CONFLICT (content): Merge conflict in src/lib.ts Automatic merge failed. # Git sees overlapping lines. # The functions don't actually overlap. weave # Same merge, with weave configured $ git merge feature-b weave [src/lib.ts]: 2 entities matched, 2 modified, 0 conflicts Merge made by the 'ort' strategy. # Different functions = no conflict. copied $ brew install weave 31 out of 31. 31 merge scenarios across 7 languages. Full breakdown
Use just the merge driver. Or add coordination for multi-agent workflows. Full docs
Article preview — originally published by Hacker News. Full story at the source.
Read full story on Hacker News →
More top stories
Aggregated and edited by the Scoop newsroom. We surface news from Hacker News alongside other reporting so you can compare coverage in one place.
Editorial policy · Corrections · About Scoop