Mergiraf is a syntax-aware merge conflict resolver for Git that uses abstract syntax trees instead of line-based merging to automatically resolve conflicts that traditional algorithms cannot handle. Built in Rust and supporting 33 languages, it leverages the tree-sitter parsing library with minimal language-specific knowledge to identify non-overlapping changes in the same line. Testing on Linux kernel history showed it successfully resolved 428 out of 7,415 merge conflicts that would have required manual intervention, with many more partially resolved. The tool can be integrated as a Git merge driver and includes a review feature to inspect its resolutions.
Sort: