pub fn split_unified_files(
input: &str,
) -> Result<Vec<UnifiedFile>, ParseDiffError>Expand description
Splits multi-file unified text into per-file hunk groups.
§Requires
inputis UTF-8 unified-diff text.
§Ensures
Ok(files)holds one entry per file section, each with at least one hunk validated byDiffDocument::from_unified.- Returns
Errfor lossy input a renderer would tolerate:\ No newlinemarkers, omitted-row markers, sections without hunks, and unparseable quoted paths. Total (terminating): single pass plus one bounded parse per section.