From: Dmitry Gutov Date: Wed, 17 Jan 2024 23:25:24 +0000 (+0200) Subject: diff-mode: Support committing diff with file deletions X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~15^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2cb1b76696b56fe01eb70d623b602dfe00613511;p=emacs.git 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). --- 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