From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 68443@debbugs.gnu.org, Aleksandr Vityazev <avityazev@disroot.org>
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 [thread overview]
Message-ID: <86ttnc2iu5.fsf@mail.linkov.net> (raw)
In-Reply-To: <f2c6dafa-0412-4bc6-81a7-9a877e9e12f4@gutov.dev> (Dmitry Gutov's message of "Wed, 17 Jan 2024 13:36:53 +0200")
>>> 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)
next prev parent reply other threads:[~2024-01-17 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-13 13:56 bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file Aleksandr Vityazev via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-17 4:25 ` Dmitry Gutov
2024-01-17 10:56 ` Aleksandr Vityazev via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-17 11:36 ` Dmitry Gutov
2024-01-17 16:32 ` Juri Linkov [this message]
2024-01-18 7:50 ` Juri Linkov
2024-01-18 16:47 ` Dmitry Gutov
2024-01-17 11:34 ` Eli Zaretskii
2024-01-17 23:26 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ttnc2iu5.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=68443@debbugs.gnu.org \
--cc=avityazev@disroot.org \
--cc=dmitry@gutov.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.