GNU bug report logs - #52507
[PATCH] Option for vc-delete-file to keep file on disk

Previous Next

Package: emacs;

Reported by: Ashwin Kafle <ashwin <at> ashwink.com.np>

Date: Wed, 15 Dec 2021 12:56:02 UTC

Severity: normal

Merged with 52508

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Ashwin Kafle <ashwin <at> ashwink.com.np>
Cc: 52507 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk
Date: Mon, 27 Dec 2021 02:03:46 +0200
On 26.12.2021 20:03, Ashwin Kafle wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
> 
>> On 26.12.2021 19:12, Ashwin Kafle wrote:
>>>> All right.
>>>>
>>>> Well, it seems like it will add more cognitive load in the "common"
>>>> scenario -- where you end up deleting the file you said you want to
>>>> delete.
>>>>
>>>> And it will be a breaking change in the existing behavior/UI.
>>> If you delete from disk it behaves exactly like how it's doing right
>>> now.  The only difference should be when you delete and immediately
>>> restore from backup and in that case, only vc-dir shows one extra file.
>>> I don't think it brakes any existing behavior.
>>
>> But the file would stay around, right? That would be different.
> 
> Only if you give vc-delete-file a prefix argument, otherwise it'll be
> exactly the same.  It will delete even if we use git rm --cached (because
> it is checked later if the file exists anymore or not)

OK, that seems to make sense. But how would we convey to the user that 
that "removed" (followed by "unregistered") refers to the staging area?

Patch which would implement this in VC-Dir/Git is welcome.

And the next step would be to ensure that such deletions (which keep the 
file on disk) can be committed by vc-next-action.




This bug report was last modified 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.