GNU bug report logs - #78213
should produce a diff with similar lines grouped together if possible

Previous Next

Package: diffutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Fri, 2 May 2025 14:19:02 UTC

Severity: normal

Full log


Message #11 received at 78213 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Robert Webb <ro.webbdg <at> gmail.com>
Cc: 78213 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#78213: should produce a diff with similar
 lines grouped together if possible
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 <vincent <at> vinc17.net> - 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)




This bug report was last modified 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.