MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / diff_raw

Function diff_raw

atomic-core/src/diff/mod.rs:184–186  ·  view source on GitHub ↗

Like [`diff`] but skips the heuristic that converts positional shifts into `Replace` operations. The record/patch-theory path uses this so that pure insertions stay as `Insert` operations — the `rewrite_positional_shifts` heuristic is designed to produce user-friendly diff display, but it mangles graph semantics by converting concurrent inserts into replacements that delete unchanged lines.

(old: &[Line<'a>], new: &[Line<'a>], algorithm: Algorithm)

Source from the content-addressed store, hash-verified

182/// semantics by converting concurrent inserts into replacements that
183/// delete unchanged lines.
184pub fn diff_raw<'a>(old: &[Line<'a>], new: &[Line<'a>], algorithm: Algorithm) -> DiffResult {
185 diff_with_options(old, new, algorithm, false)
186}
187
188fn diff_with_options<'a>(
189 old: &[Line<'a>],

Callers 1

generate_diffFunction · 0.85

Calls 1

diff_with_optionsFunction · 0.85

Tested by

no test coverage detected