Skip to main content

normalized_diff

Function normalized_diff 

Source
pub fn normalized_diff(base: &str, proposed: &str) -> String
Expand description

The position-independent content of a change: the deleted and inserted lines of its diff, with hunk positions and context stripped — the cheap analog of git patch-id --stable (DECISIONS.md D15: metadata, never a new merge substrate). Two authorings of the same edit on different bases — the change before and after the train rewrites or rebases it — normalize to the same string, which is what lets a queue or bridge recognize an already-landed change instead of re-merging it. It lives here because this crate already owns the diff dependency; callers hash the result.