]> git.eshelyaron.com Git - emacs.git/commitdiff
diff-mode: Support committing diff with file deletions
authorDmitry Gutov <dmitry@gutov.dev>
Wed, 17 Jan 2024 23:25:24 +0000 (01:25 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 31 Jan 2024 20:01:07 +0000 (21:01 +0100)
* lisp/vc/diff-mode.el (diff-vc-deduce-fileset):
Remove nil elements from the result (bug#68443).

(cherry picked from commit 2cb1b76696b56fe01eb70d623b602dfe00613511)

lisp/vc/diff-mode.el

index 03efe0fdb3146cea9fbc70df3f8067e0eb29a679..83d580d98dd8c5d49c4bc41948f5f1c5b69be85d 100644 (file)
@@ -3014,7 +3014,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