- A project to define a common language for merge rules. See the Announcement Discussion
- Implementations of the merge rules contract across multiple languages
- Support for template merges (2-way) and git merges (3-way)
- Find out more at StructuredMerge.org
🙋♀️ Currently we are just a few people / nerds. If you are interested in document merge semantics or ASTs we'd love your assistance!
🐪 This is the first open source project of its kind (meaning specifically: an attempt to draft a spec for merge language vocabulary and build compliant implementations across multuiple languages) we are aware of! If you know of prior art we would love to hear about it.
Prior/Contemporaneous Art
Things we've heard about that are similar in some ways:
- difftastic - structural diff tool, parses with tree-sitter, compares syntax aware structure, and renders human oriented diffs. Does not generate patches, or perform merges.
- mergiraf - syntax-aware git merge driver implemented in Rust. Uses tree-sitter, and implements a fine-grained, 3DM-inspired, 3-way merge.
- spork - AST-based merges in Java, based on the research paper
arXiv-2202.05329v1. 3DM-derived merge over PCS/change-set structures, with custom conflict handling, formatting-aware printing, and git compatibility mode. - weave - entity-level semantic merge driver implemented in Rust, based on tree-sitter, which falls back to line-merge within multi-line entity spans.
- Go implementation
- Ruby implementation
- Rust implementation
- Typescript implementation
- spec contains the latest MERGE_RULESET_INFORMATIONAL_DRAFT_02.md among other bits
- fixtures contains baseline fixtures that any merge tool implementing the spec can validate against
- This project is dual-licensed under AGPL-3.0-only and PolyForm-Small-Business-1.0.0, so pick whichever suits you best, or contact
info@structuredmerge.orgto request a license exception.