Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

🐛 Change attributed to wrong file #1042

Closed
abbeyj opened this issue Apr 11, 2022 · 2 comments
Closed

🐛 Change attributed to wrong file #1042

abbeyj opened this issue Apr 11, 2022 · 2 comments

Comments

@abbeyj
Copy link

abbeyj commented Apr 11, 2022

Given the following input to delta, delta will show the line "// Also to be removed" as being removed from two.txt when it is actually being removed from one.cpp.

$ delta --version
delta 0.12.1
$ cat diff_repro.patch
--- orig/one.cpp        2022-04-11 11:21:45.977732000 -0400
+++ ./one.cpp   2022-04-11 11:22:00.664111000 -0400
@@ -1,5 +1,3 @@
-// To be removed

 // To be kept

-// Also to be removed
--- orig/two.txt        2022-04-11 11:16:53.878365000 -0400
+++ ./two.txt   2022-04-11 11:16:46.737482000 -0400
@@ -1 +1 @@
-Something
+Something Else
$ cat diff_repro.patch | delta

image

Adding a blank line to the input before the --- orig/two.txt line is a workaround.

@dandavison
Copy link
Owner

Thank you very much @abbeyj. Sorry to be slow -- I was on holiday, and then a bit occupied by day job. This is clearly bad and we'll fix it!

@dandavison
Copy link
Owner

Actually, this one was already fixed in March by #1003 and has been released.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants