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: Wed, 15 Dec 2021 18:34:31 +0000 Message-ID: <8535mt67k8.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> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22711"; 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, Juri Linkov To: Ashwin Kafle Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 15 20:31: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 1mxZzt-0005mL-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 20:31:29 +0100 Original-Received: from localhost ([::1]:34834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxZzs-0006bY-TY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 14:31:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxZ6K-00029p-RJ for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:34:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxZ6I-0000HQ-F0 for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:34:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxZ6I-0005dM-BN for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:34: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: Wed, 15 Dec 2021 18:34:02 +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.163959322021624 (code B ref 52507); Wed, 15 Dec 2021 18:34:02 +0000 Original-Received: (at 52507) by debbugs.gnu.org; 15 Dec 2021 18:33:40 +0000 Original-Received: from localhost ([127.0.0.1]:33690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxZ5w-0005ch-2E for submit@debbugs.gnu.org; Wed, 15 Dec 2021 13:33:40 -0500 Original-Received: from forward100p.mail.yandex.net ([77.88.28.100]:40376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxZ5t-0005cT-Ns for 52507@debbugs.gnu.org; Wed, 15 Dec 2021 13:33:39 -0500 Original-Received: from myt6-2da614b3f5d3.qloud-c.yandex.net (myt6-2da614b3f5d3.qloud-c.yandex.net [IPv6:2a02:6b8:c12:5f2e:0:640:2da6:14b3]) by forward100p.mail.yandex.net (Yandex) with ESMTP id D07E74F0775E; Wed, 15 Dec 2021 21:33:30 +0300 (MSK) Original-Received: from myt5-aad1beefab42.qloud-c.yandex.net (myt5-aad1beefab42.qloud-c.yandex.net [2a02:6b8:c12:128:0:640:aad1:beef]) by myt6-2da614b3f5d3.qloud-c.yandex.net (mxback/Yandex) with ESMTP id ww84Gq9XsL-XUeerOSL; Wed, 15 Dec 2021 21:33:30 +0300 Authentication-Results: myt6-2da614b3f5d3.qloud-c.yandex.net; dkim=pass Original-Received: by myt5-aad1beefab42.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id ktsMMKdRwj-XTPKrnJK; Wed, 15 Dec 2021 21:33:29 +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: <85fsqt67y1.fsf@ashwink.com.np> (Ashwin Kafle's message of "Wed, 15 Dec 2021 18:26:14 +0000") 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:222445 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ashwin Kafle writes: >> Also it looks that your another change is dangerous: >> >> (defun vc-git-delete-file (file) >> - (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--")) >> + (vc-git-command nil 0 (vc-git--literal-pathspec file) "rm" "-f" "--ca= ched" "--"))) >> >> because it deletes the file in the staging area >> that is not used by vc-git, so there is no way >> to commit the deletion using vc commands. > > I think this check in vc-delete-file takes care of that > > (when (eq state 'edited) > (error "Please commit or undo your changes before deleting %s" fi= le)) Oh, you mean just that single commit can't be done by vc now. Yeah, that seems true. Can you think of any solution for that here?=20 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHKBAEBCAA0FiEEvNoXmdYXLw2CzQ66EHbebDayoY8FAmG6NTcWHGFzaHdpbkBh c2h3aW5rLmNvbS5ucAAKCRAQdt5sNrKhj+3UDACh/D3SmBo0gXG/8klqAdTklpTI CLCXzQzc34o/cqm8R23CCS1Kx7kO/pAc/OUNBwuTXb9kaP+CN+oc1fSg0SEIU96k kLdro5y2Dcu8t7/T42MtS0IO+2kXI51ucP4Er/doQ6xDpy056vL2B8ETVtmM8j9e Wzvg1VuHuLS3BkCHPDODhNGctMaPmOByrqZvrd7rcTM+zCAmLHHHLephV5H8DoRe x0LjGULN7urdW1SNzpF9V0LBdumNB1OCVfyCaILBoLlVY8w60CygQSbHl8oMiPCt go1XPpvJ5qfixbrUNoh/popMUI287j/K86dIaDB22F16sMPtt+f2e7eSIcxP6QCh FkD1k2PP6JuolrwTbGkPEHL5sjP7ezGkLYt6GqdZZLT1j0XgQdT5nOzRGa7kxxgg pOGcRy+CrD4FGcs+ZMWIm49cs2lqD5vJ6rxv37ZORb8LSFkj0DxBZ0kwL65P75uD lCMrUPIhoAEvSLMRpQV5ZwyTuRHx9t1F5lHzP0U= =rI7L -----END PGP SIGNATURE----- --=-=-=--