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: Tue, 22 Feb 2022 00:00:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I pushed a patch to `master` which should handle those cases correctly.
> Please confirm that it also fixes the problem on your side,

Yes, thanks a lot Stefan. The fix looks good to me!

I found one unhandled case. When a diff changes a file mode, like in the
following:

    diff --git a/argos/session.py b/argos/session.py
    old mode 100755
    new mode 100644

Note that it becomes "problematic" when the diff cumulates file
modification and mode change for the same file.  I understand that the
"old mode" and "new mode" lines are the culprit since they're not
handled by the regexp used by diff--font-lock-prettify:

PNG image

I also saw you added a comment saying "FIXME: Add support for Git's
"rename from/to"?".  I am curious: What do you have in mind?  What kind
of output of "git diff" do you want to support? Do you want to link the
related "New file" and "Deleted file" hunks?
-- 
Matthias

reply via email to

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