From 99b0199253f13def674924dca69451121e95e907 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 27 Apr 2026 10:25:48 +0100 Subject: [PATCH] diff-kill-creations-deletions: Look for /dev/null on all platforms * lisp/vc/diff-mode.el (diff-kill-creations-deletions): Look for /dev/null on platforms when null-device is something else. --- lisp/vc/diff-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 5d6f478d3e8..32f34ebaa10 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1252,8 +1252,10 @@ Optional argument DELETE is passed on to `diff-file-kill'." (goto-char (point-min)) (ignore-errors (diff-file-next)) for (name1 name2) = (diff-hunk-file-names) - if (or (equal name1 null-device) - (equal name2 null-device)) + ;; Allow for "/dev/null" on all platforms, as some versions + ;; of Diff produce that for "portability". + if (or (member name1 (list null-device "/dev/null")) + (member name2 (list null-device "/dev/null"))) do (diff-file-kill delete) else if (eq (prog1 (point) (ignore-errors (diff-file-next)))