Split a unified git diff into per-file sections.
git diff
Each section starts at a diff --git a/… b/… header. The file path is taken from the +++ b/… line when present (handles renames), falling back to the diff --git header.
diff --git a/… b/…
+++ b/…
diff --git
Split a unified
git diffinto per-file sections.Each section starts at a
diff --git a/… b/…header. The file path is taken from the+++ b/…line when present (handles renames), falling back to thediff --githeader.