pub fn build_partial_patch(
diff: &Diff,
selected: &BTreeSet<usize>,
mode: PartialMode,
) -> Option<String>Expand description
Build a patch staging/unstaging exactly the selected rows of diff (row
indices into diff.lines). Returns None when the selection covers no
changed line, so the caller can treat it as a no-op.