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


View this message in rfc822 format

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Robert Webb <ro.webbdg <at> gmail.com>
Cc: 78213 <at> debbugs.gnu.org
Subject: bug#78213: [bug-diffutils] bug#78213: should produce a diff with similar lines grouped together if possible
Date: Sat, 3 May 2025 11:45:45 +0200
[Message part 1 (text/plain, inline)]
On 2025-05-03 11:24:10 +0200, Vincent Lefevre wrote:
> On 2025-05-03 01:12:44 -0700, Robert Webb wrote:
> >       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.

Here's a new version of the testcase, with files having short lines.

Note: To obtain file-ok.diff, I first added a character in the
first empty line of "file2", generated the diff with "diff -u"
(with the added character, the issue with the first common empty
lines disappears, so that the diff is good), then removed the
character from the generated diff.

-- 
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)
[file1 (text/plain, attachment)]
[file2 (text/plain, attachment)]
[file-bad.diff (text/plain, attachment)]
[file-ok.diff (text/plain, attachment)]

This bug report was last modified 43 days ago.

Previous Next


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