gix_merge::blob::builtin_driver

Function text

source
pub fn text<'a>(
    out: &mut Vec<u8>,
    input: &mut InternedInput<&'a [u8]>,
    _: Labels<'_>,
    current: &'a [u8],
    ancestor: &'a [u8],
    other: &'a [u8],
    opts: Options,
) -> Resolution
Expand description

Merge current and other with ancestor as base according to opts.

Use labels to annotate conflict sections.

input is for reusing memory for lists of tokens, but note that it grows indefinitely while tokens for current, ancestor and other are added. Place the merged result in out (cleared before use) and return the resolution.

ยงImportant

The caller is responsible for clearing input, otherwise tokens will accumulate. This idea is to save time if the input is known to be very similar.