pub fn compute_diff_sign_map(hunks: &HunkIndex) -> DiffSignMapExpand description
D.3.d.0: derive a DiffSignMap from a HunkIndex.
Walks each hunk’s current-side range (ranges[1]):
Add→ every line in the range getsAdd.Change/Conflict→ every line in the range getsChange(the current-side rows are the replacements).Remove→ no current-side lines exist; the deletion is surfaced through the virtual-row deletion block (D.3.b) and gets no sign in the sign map. Renderers wanting to sign the insertion point of a removed hunk should render based on the deletion block’s anchor line (a future D.3.d.1 detail) — keeping the sign map a strictly-current-rope decoration here avoids double-counting at the deletion anchor.
Entries are sorted by line before return so
DiffSignMap::sign_at binary-searches cheaply.