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

From: Matthias Meulien <[email-masked]>
Date: Tue, 22 Feb 2022 07:58:29 +0100

Stefan Monnier <[email-masked]> writes:

> I just pushed a change for that as well.

Thank you!

> Of course, there's always the problem that this prettification
> hides info, so there's a tension here.

You're right.

Would changing the string "Modified file  " to "Modified file and file
mode  " be better when both the file and the file mode are changed?

We also could handle "mode changes" only hunks with the string "Modified
file mode ".

Does this proposal looks good to you? I can try to implement it.

Unfortunately for the last case we'll have to modify the regex to match
the file name from the "diff --git" line...

To improve the situation on hidden info, would it make sense to provide
a `diff-toggle-display-properties-at-point`?  Or/and provide the
original text as tooltip?  Just thinking.
-- 
Matthias