wandersoncferreira / code-review

Code Reviews in Emacs
https://wandersoncferreira.github.io/code-review/
GNU General Public License v3.0
462 stars 49 forks source link

Fix diff handling when the line count did not change. #224

Closed canatella closed 1 year ago

canatella commented 1 year ago

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. 
wandersoncferreira commented 1 year ago

Thanks @canatella , sorry for the late reply. Can you please add a new PR including your data in the CONTRIBUTORS.md file?