Subject: Re: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk

From: Ashwin Kafle <[email-masked]>
Date: Sun, 26 Dec 2021 14:31:38 +0000

Dmitry Gutov <[email-masked]> writes:

>> Then after this, the user can manually rename the unregistered backup
>> by removing ~ from the file name.
>> So it seems that you want to automate the last part, i.e.
>> to try automatically rename the file from its backup copy
>> after all changes were committed?
>
> So a "restore from backup" step indeed could be a solution for this problem.

For current vc, restore from backup would only work after a commit which
i don't think is desirable much as you could go days without a commit
and 'C-u C-x v x' saying it will not delete the file would be wrong.

I don't know vc-internals but vc-git using git's --porcelain as juri
said is probably a much better idea.