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

Unified Diff Hunk Description Wrong #22

Closed
RLovelett opened this issue May 8, 2013 · 3 comments
Closed

Unified Diff Hunk Description Wrong #22

RLovelett opened this issue May 8, 2013 · 3 comments
Assignees
Labels

Comments

@RLovelett
Copy link

I think there is an issue in the ldiff -u output.

Running ldiff -u data_set_1.csv data_set_2.csv > ldiff.patch generates:

--- spec/data/data_set_1.csv  2013-05-07 15:37:17.592816097 -0500
+++ spec/data/data_set_2.csv    2013-05-07 15:37:17.592816097 -0500
@@ -3,7 +3,7 @@
 3,13
 4,21
 5,31
-6,43
+6,42
 7,57
 8,73
 9,91
@@ -16,7 +16,7 @@
 16,273
 17,307
 18,343
-19,381
+19,200
 20,421
 21,463
 22,507
@@ -28,10 +28,10 @@
 28,813
 29,871
 30,931
-31,993
+31,123
 32,1057
 33,1123
-34,1191
+34,1000
 35,1261
 36,1333
 37,1407
@@ -44,8 +44,9 @@
 44,1981
 45,2071
 46,2163
-47,2257
+47,1524
 48,2353
 49,2451
 50,2500
+51,2520

I believe the last hunk description is wrong. It should be @@ -44,7 +44,8 @@. Running Unix diff confirms my suspicions.

All of the files (including data_set_1.csv and data_set_2.csv) can be found in this Gist.

@halostatue
Copy link
Owner

Confirmed as still an issue. I'll be looking at it soon.

@halostatue halostatue self-assigned this Jan 18, 2017
@halostatue halostatue added the Bug label Jan 18, 2017
@halostatue
Copy link
Owner

Confirmed that this is still an issue even with the #5 and #6 fix that are incoming. The problem is larger than currently reported.

@halostatue
Copy link
Owner

The release of 1.4 has fixed a number of issues with diff output and the output seems to be better than previously. However, the linked gist no longer exists and I cannot verify that this issue is fixed. I am closing this issue, but if you see any other issues with the output format of diff-lcs not matching diff, please file a new bug.

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

No branches or pull requests

2 participants