emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 2cb1b76696b: diff-mode: Support committing diff with file delet


From: Dmitry Gutov
Subject: emacs-29 2cb1b76696b: diff-mode: Support committing diff with file deletions
Date: Wed, 17 Jan 2024 18:25:39 -0500 (EST)

branch: emacs-29
commit 2cb1b76696b56fe01eb70d623b602dfe00613511
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    diff-mode: Support committing diff with file deletions
    
    * lisp/vc/diff-mode.el (diff-vc-deduce-fileset):
    Remove nil elements from the result (bug#68443).
---
 lisp/vc/diff-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 2b9d12a5756..4f150dc7f36 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2955,7 +2955,7 @@ hunk text is not found in the source file."
       (goto-char (point-min))
       (while (progn (diff-file-next) (not (eobp)))
         (push (diff-find-file-name nil t) files)))
-    (list backend (nreverse files) nil nil 'patch)))
+    (list backend (delete nil (nreverse files)) nil nil 'patch)))
 
 (defun diff--filter-substring (str)
   (when diff-font-lock-prettify



reply via email to

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