Skip to main content

parse_change_anchors

Function parse_change_anchors 

Source
pub fn parse_change_anchors(diff: &str) -> Vec<ChangeAnchor>
Expand description

Parse a zero-context unified diff (git diff --unified=0) into per-hunk ChangeAnchors. Each hunk’s added (+) lines form one anchor. Rename headers make the anchor rename-durable via previous_change_anchor. Pure: the same diff text always yields the same anchors.