Subject: Re: [bug-diffutils] bug#78213: should produce a diff with similar lines grouped together if possible

From: Vincent Lefevre <[email-masked]>
Date: Sat, 3 May 2025 11:24:10 +0200

On 2025-05-03 01:12:44 -0700, Robert Webb wrote:
> The diff to create file-bad.diff was with the '-u' option.

Yes, I forgot to mention that as this is what I *always* use
(and I always see diffs generated with this option).

> The only lines that match between the file1 and file2 are empty ones.
> This bash command shows only an empty line in common:
>   comm -12 -- <(sort -u file1) <(sort -u file2)
> 
> Note: The line terminator on the provided files is CRLF.

No, a single LF as usual (I suspect that some mail software converts
them to CRLF when saving).

>       Long lines - Use 'less -S'  :-)

Well, be careful that the difference between the lines are at the end.
I generated the files with "lorem -p 5" as the goal was to generate
5 paragraphs (and there is no way to get shorter paragraphs), and
slightly editing them. I now think that "lorem -s 5" (to generate
5 sentences in a single paragraph) would have been better here since
I had to add blank lines for the testcase anyway.

-- 
Vincent Lefèvre <[email-masked]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)