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

From: Matthias Meulien <[email-masked]>
Date: Sun, 20 Feb 2022 17:50:26 +0100

Stefan Monnier <[email-masked]> 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.