-
Notifications
You must be signed in to change notification settings - Fork 4
Single line change parse issue with "normal" chunk headers #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sorry for the late response. I'll make the correction. |
Hi @DavisVaughan , It's not reproduced in (updated) I've noticed that it reproduces in 0.0.16 but not in 0.0.17. Updating the version should resolve it.
|
Looks like suggest-changes's tag hasn't been updated since October 2024, even though |
See parkerbxyz/suggest-changes#50 (comment)
The TLDR is that it seems like parse-git-diff can handle
@@ -74,2 +74 @@
, but for 1 line changes git will omit the,1
and just report@@ -74 +74 @@
and that causes the regex handling in parse-git-diff to break.I see the "normal" chunk regex here:
parse-git-diff/src/parse-git-diff.ts
Lines 223 to 224 in e8ed56d
Which gets expanded out here:
parse-git-diff/src/parse-git-diff.ts
Lines 268 to 269 in e8ed56d
I'm no expert here but I think whats happening is that it has an optional capture group for the
,<digit>
which should becomedelLines
, but that's missing here so instead the next capture group actually gets put in asdelLines
, which happens to beaddStart
, which is94
, so it reports94
lines infromFileRange
😢The text was updated successfully, but these errors were encountered: