Skip to content
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

Apply patch doesn't work as expected when removing all contents of a file #177

Closed
dolftax opened this issue May 9, 2017 · 2 comments · Fixed by #447
Closed

Apply patch doesn't work as expected when removing all contents of a file #177

dolftax opened this issue May 9, 2017 · 2 comments · Fixed by #447

Comments

@dolftax
Copy link

dolftax commented May 9, 2017

Diff

===================================================================
--- index.js
+++ index.js
@@ -1,3 +1,0 @@
-this
-
-tos
\ No newline at end of file

Local file content before applying the patch

this

tos

Local file content after applying the patch

this

FYI, fuzzFactor is zero.

@dolftax
Copy link
Author

dolftax commented May 9, 2017

Also, applyPatch is returning false boolean at times.

@piranna
Copy link
Contributor

piranna commented Aug 15, 2017

Seems an off-by-one counting, probably related to my problem at #189.

ExplodingCabbage added a commit that referenced this issue Dec 27, 2023
* Fix a trivial code formatting inconsistency

* Add test showing patch from bug #177 is handled correctly now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants