summaryrefslogtreecommitdiff
path: root/lisp/vc/diff-mode.el
diff options
context:
space:
mode:
authorDmitry Gutov <dmitry@gutov.dev>2024-01-18 01:25:24 +0200
committerDmitry Gutov <dmitry@gutov.dev>2024-01-18 01:25:24 +0200
commit2cb1b76696b56fe01eb70d623b602dfe00613511 (patch)
treef8680f2dc1d535a8972676aab2441dcb547c2449 /lisp/vc/diff-mode.el
parentb96aa528f642f69e2b42620807d53f8d9bbd9623 (diff)
downloademacs-2cb1b76696b56fe01eb70d623b602dfe00613511.tar.gz
emacs-2cb1b76696b56fe01eb70d623b602dfe00613511.tar.bz2
emacs-2cb1b76696b56fe01eb70d623b602dfe00613511.zip
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).
Diffstat (limited to 'lisp/vc/diff-mode.el')
-rw-r--r--lisp/vc/diff-mode.el2
1 files changed, 1 insertions, 1 deletions
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