From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ashwin Kafle Newsgroups: gmane.emacs.bugs Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk Date: Sun, 26 Dec 2021 17:03:23 +0000 Message-ID: <85ilvb8fj8.fsf@ashwink.com.np> References: <20211215095324.18195-1-ashwin@ashwink.com.np> <86a6h13j4i.fsf@mail.linkov.net> <85o85hsr3b.fsf@ashwink.com.np> <861r2dzqrj.fsf@mail.linkov.net> <85fsqt67y1.fsf@ashwink.com.np> <8535mt67k8.fsf@ashwink.com.np> <86k0g4a875.fsf@mail.linkov.net> <85czljcund.fsf@ashwink.com.np> <85h7av9xf8.fsf@ashwink.com.np> <85e94803-dd45-8223-a0b8-9ae3ca8e268b@yandex.ru> <85tuevjqg2.fsf@ashwink.com.np> <89a1cb96-80dc-bdc9-8f4f-409b0aa692c0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29115"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52507@debbugs.gnu.org, Ashwin Kafle , Juri Linkov To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 26 18:03:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1Wvh-0007Ob-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 18:03:29 +0100 Original-Received: from localhost ([::1]:54828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1Wvf-00063M-0v for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 12:03:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1WvG-00061j-Kw for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 12:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1WvG-00029v-Bt for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 12:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1WvG-0003Xa-0X for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 12:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ashwin Kafle Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Dec 2021 17:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52507-submit@debbugs.gnu.org id=B52507.164053814813552 (code B ref 52507); Sun, 26 Dec 2021 17:03:01 +0000 Original-Received: (at 52507) by debbugs.gnu.org; 26 Dec 2021 17:02:28 +0000 Original-Received: from localhost ([127.0.0.1]:41413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1Wuh-0003WW-N0 for submit@debbugs.gnu.org; Sun, 26 Dec 2021 12:02:27 -0500 Original-Received: from forward108p.mail.yandex.net ([77.88.28.116]:38148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1Wuf-0003WE-Bh for 52507@debbugs.gnu.org; Sun, 26 Dec 2021 12:02:26 -0500 Original-Received: from iva8-82124814dfe8.qloud-c.yandex.net (iva8-82124814dfe8.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:792d:0:640:8212:4814]) by forward108p.mail.yandex.net (Yandex) with ESMTP id CC7A72674FA2; Sun, 26 Dec 2021 20:02:17 +0300 (MSK) Original-Received: from iva6-2d18925256a6.qloud-c.yandex.net (iva6-2d18925256a6.qloud-c.yandex.net [2a02:6b8:c0c:7594:0:640:2d18:9252]) by iva8-82124814dfe8.qloud-c.yandex.net (mxback/Yandex) with ESMTP id qlKGgZnlfr-2He8j13N; Sun, 26 Dec 2021 20:02:17 +0300 Authentication-Results: iva8-82124814dfe8.qloud-c.yandex.net; dkim=pass Original-Received: by iva6-2d18925256a6.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id 9RJiZWpBsZ-2FPuq86x; Sun, 26 Dec 2021 20:02:16 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Yandex-Fwd: 2 In-Reply-To: <89a1cb96-80dc-bdc9-8f4f-409b0aa692c0@yandex.ru> (Dmitry Gutov's message of "Sun, 26 Dec 2021 18:28:28 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223155 Archived-At: Dmitry Gutov 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) > > And I was referring to the VC-Dir interface which would show new > elements (additional entries for some files). Only if the file is deleted in the index and has not been commited yet.