Subject: Re: bug#52508: Option for vc-delete-file to keep file on disk

From: Sean Whitton <[email-masked]>
Date: Mon, 10 Mar 2025 14:59:57 +0800

close 52508
thanks

On Thu 08 Sep 2022 at 04:17pm +02, Lars Ingebrigtsen wrote:

> Reading this bug report, it's unclear what the conclusion is.  I agree
> that it would be useful to have a command to remove a file from the VC
> without deleting it.  But I don't think the proposed implementation is
> safe, because it only works with git -- and in other VCs, doing `C-u M-x
> vc-delete-file' would continue to delete the file, contrary to what the
> doc string says.
>
> Dmitry suggested to alter the interface, but that makes for awkward
> compatibility.
>
> Perhaps this should be a new command instead?  That'd be less confusing,
> I think.  `M-x vc-remove-file', for instance.

In addition, in the interim, a lot has changed in this area, because now
we have committing of individual hunks, and we had to deal with some
tricky issues relating to file addition and deletion in that context.

I think we need a fresh proposal and PoC patch to proceed any further
and I think it should probably be a new bug report.  So I'm going ahead
and closing this one.

I had one general comment after reading: I think we should avoid letting
the git staging area become visible to the user as much as we possibly
can, even in Git-specific VC code.

There is the general concern of remaining compatible with past and
future VCS.  But I think eschewing use of the staging area is one of
VC's selling points over Magit for people who only actually use Git.

-- 
Sean Whitton