pub fn parse_unified_diff(input: &str) -> DiffDocumentExpand description
Parse a git diff output into a DiffDocument.
Handles:
diff --git a/X b/Yfile headersrename from X/rename to Y— populatesDiffFile::old_pathsimilarity index N%— currently skipped (recorded but not exposed)new file mode .../deleted file mode ...— skippedBinary files X and Y differ— setsDiffFile::binaryand emits no hunksindex abc..def 100644— skipped--- a/X/+++ b/Y— consumed as part of the file header@@ -old,count +new,count @@— hunk headers- context /
+/-lines
Multiple files are supported and emitted in source order.