Parse a unified diff and extract the added lines with their file line numbers.
Tracks hunk headers (@@ ... @@) to maintain accurate line numbering. Removed lines (-) do not advance the line counter; context lines do.
@@ ... @@
-
A unified diff string (e.g. from git diff --cached).
git diff --cached
An array of AddedLine objects for each + line in the diff.
+
Parse a unified diff and extract the added lines with their file line numbers.
Tracks hunk headers (
@@ ... @@) to maintain accurate line numbering. Removed lines (-) do not advance the line counter; context lines do.