This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Mahmoud Al-Qudsi, tim.peters
Date 2017-09-24.04:13:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506226404.24.0.343542850205.issue31561@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not familiar with `icdiff` - it's not part of the Python distribution, right?  If so, you should really talk to its author(s).

If two files have different line endings, then no pair of lines between them can be equal, and the difference engine will struggle mightily to find the "best matching" pair of lines between them, over & over & over ... again.  That's expected, and is expensive (roughly cubic in the number of lines).

So "don't do that" is the obvious answer.  If you think it's something that comes up often enough that `icdiff` should do magic to worm around it, they could - with enough pain - normalize line endings to a canonical form, and then post-process the diff engine's output to say that some lines it thought were equal actually weren't.  Or you maybe you want them treated as equal despite that the line endings don't match?  Nobody can guess, so at best another option would need to be added to specify which.  That's messy all around, so they'll probably resist.

Just like I'd mightily resist mucking up difflib to do that itself ;-)  Seriously, if you're messing with files containing a mix of line endings, you're begging for surprises from all sorts of tools.
History
Date User Action Args
2017-09-24 04:13:24tim.peterssetrecipients: + tim.peters, Mahmoud Al-Qudsi
2017-09-24 04:13:24tim.peterssetmessageid: <1506226404.24.0.343542850205.issue31561@psf.upfronthosting.co.za>
2017-09-24 04:13:24tim.peterslinkissue31561 messages
2017-09-24 04:13:23tim.peterscreate