GNU bug report logs - #54034
29.0.50; Diff prettify broken for empty files

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Thu, 17 Feb 2022 07:49:02 UTC

Severity: normal

Found in version 29.0.50

Full log


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

From: Matthias Meulien <orontee <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 54034 <at> debbugs.gnu.org
Subject: Re: bug#54034: 29.0.50; Diff prettify broken for empty files
Date: Sun, 20 Feb 2022 17:50:26 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> (...)  It should be easy to handle those cases as well.  Can you
> suggest a good replacement?  (i.e. what should we display instead of
> the "diff --git ..." stuff)

When the empty file empty.py is added, I expect to
read:

    new file  empty.py

Analogous expectations with "deleted " and "modified ", the file being a
binary file or not.

Thus my suggestion is to use exactly the same replacement as for
non-empty, text files!

It looks like being empty or binary, implies that the diff won't output
+++, nor --- lines, which makes current regex inappropriate.




This bug report was last modified 2 years and 349 days ago.

Previous Next


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