It seems that, at least on bitbucket, when a hunk as no line count change, the hunk header is like @@ -1 +1 @@ while we expect something like @@ -1,0 +1,0 @@. Updated the regular expression to understand this.
Digging further, this is described in the diff manual:
If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.
It seems that, at least on bitbucket, when a hunk as no line count change, the hunk header is like
@@ -1 +1 @@
while we expect something like@@ -1,0 +1,0 @@
. Updated the regular expression to understand this.Digging further, this is described in the diff manual: