bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54034: 29.0.50; Diff prettify broken for empty files


From: Matthias Meulien
Subject: bug#54034: 29.0.50; Diff prettify broken for empty files
Date: Sun, 20 Feb 2022 17:50:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]