Skip to main content

Crate mergiraf

Crate mergiraf 

Source
Expand description

Syntax aware merging of diverging files

§Overview

Mergiraf is a structured merge tool. It takes three versions of a file (base, left and right) and produces a fourth version where the changes from base to left and from base to right are added. It does so with awareness of the syntax of the files, unlike Git’s built-in line-based merge algorithm.

It is primarily designed to be used as a CLI which implements Git merge driver. This means that it can replace Git’s default merge algorithm when merging or rebasing branches.

§Using as a library to build other programs

Mergiraf is not designed to be used as a library so far, the Rust API is therefore not meant to be stable.

Modules§

ast
attempts
bug_reporter
lang_profile
line_based
newline
settings
supported_langs
utils

Constants§

DISABLING_ENV_VAR
Current way to disable Mergiraf

Traits§

PathBufExt
StrExt

Functions§

languages
The implementation of mergiraf languages.
line_merge_and_structured_resolution
Merge the files textually and then attempt to merge any conflicts in a structured way (see [structured_merge]). If there are still conflicts and a full merge is requested, a fully structured merge (independently of the textual merge) is attempted
resolve_merge_cascading
Cascading merge resolution starting from a user-supplied file with merge conflicts