bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted f


From: Juri Linkov
Subject: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file.
Date: Wed, 17 Jan 2024 18:32:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
>>> index 03efe0fdb31..83d580d98dd 100644
>>> --- a/lisp/vc/diff-mode.el
>>> +++ b/lisp/vc/diff-mode.el
>>> @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset
>>>         (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)))
>> Yes with this patch the error is no longer present, but the deleted file
>> is not displayed in the *log-edit-files* buffer, unlike if you run
>> vc-next-action from *vc-dir*. Although this is another bug report.
>
> Right, that's still a remaining problem. diff-find-file-name doesn't really
> want to "find" files that don't exist on disk, so it might need
> a replacement for such cases.

Indeed, the problem is that diff-find-file-name doesn't get the name
of the deleted file even when called with OLD=t:

    ;; Use file-regular-p to avoid
    ;; /dev/null, directories, etc.
    ((or (null file) (file-regular-p file))
     file)





reply via email to

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