It would be helpful if you add in a comment somewhere about the format of the diff hunk. E.g. from https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html:

Each group of changes (called a "hunk") in the textual diff output is prefixed with a line of the form:

@@ -k,l +n,m @@ TEXT

This is called a hunk header. The "TEXT" portion is by default a line that begins with an alphabet, an underscore or a dollar sign; this matches what GNU diff -p output uses.