From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#52507: [PATCH] Option for vc-delete-file to keep file on disk Date: Mon, 27 Dec 2021 02:03:46 +0200 Message-ID: <5fb80cff-2292-3a48-c789-5bedc8d1816c@yandex.ru> 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> <85ilvb8fj8.fsf@ashwink.com.np> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 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 Mon Dec 27 01:06:17 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 1n1dWr-0006hS-Hf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Dec 2021 01:06:17 +0100 Original-Received: from localhost ([::1]:38088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1dWp-0003SJ-In for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Dec 2021 19:06:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:32784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1dWi-0003Rw-SI for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 19:06:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1dWc-0008MN-PX for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 19:06:08 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1dWc-0005iS-Hd for bug-gnu-emacs@gnu.org; Sun, 26 Dec 2021 19:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Dec 2021 00:06: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.164056350721894 (code B ref 52507); Mon, 27 Dec 2021 00:06:02 +0000 Original-Received: (at 52507) by debbugs.gnu.org; 27 Dec 2021 00:05:07 +0000 Original-Received: from localhost ([127.0.0.1]:41866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1dVj-0005h4-E0 for submit@debbugs.gnu.org; Sun, 26 Dec 2021 19:05:07 -0500 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:42760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1dVg-0005gQ-7A for 52507@debbugs.gnu.org; Sun, 26 Dec 2021 19:05:06 -0500 Original-Received: by mail-wr1-f47.google.com with SMTP id w20so20307231wra.9 for <52507@debbugs.gnu.org>; Sun, 26 Dec 2021 16:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C14gwPAaCWrPFSWnnwlK7yhgecR3ZS3DFvyHXDwE1IA=; b=KK2PmV0iif+mmBxf5dGj95dhCGjamSF1WdfwKLJxceQmBRy5g2A5nD1/CY8zCwBmjT xLpZ1CKqJzGFZZjCL9fVKNZNEyXd0cq6fR7pHENje7apk4ypdiZR1QxM2Pi4lPUmEvIo jmjfxn+HAhh5o+1fqWhYHwfILdvDwChnjyEmHhyvK1g8diKuj45J3LqwZEkOT1Kl2hTc tMpjPTMUHzMGIAc4HFauBv0mMZLz6b0AdEWvKhMlWGKfZniYE11/bVfIXGbVN47WGpUN SFat7voGUZUk++CJS0lys2ALXy3ht1qojx74ZzdYgVqakyVTEBUmz5sGh4T6F2hWIoHb Jmwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C14gwPAaCWrPFSWnnwlK7yhgecR3ZS3DFvyHXDwE1IA=; b=FohR/WVyrKOOhzSI88miJcjc9r1FptIFIyauZOJOu5WKVJUHRcCIM4Idvo36fyyUX1 /ZFpg0epzWBW2gpMD6qjlg+PQhQUowQVmtFRp1wYtH6y934syeTUPn97/DD1+LInb+Lt QaD8j/bOt4b4A9PFi3TRs9RvIAHc0DWpGOSoAzaZWE+HBKqfUt6zTGhH0ihJBnlcywZ4 GYq8Gj5LLhi6MWTqxmN6lQy6wdh8wnRuAR6i7sbEuezs90APOQOQIRmJkbgHSMjponyf zR4K0C8JzgT5JCSsG1WpDdrSXYvb7WGa02WuL4kN4yb4Mek9wcvvqySU+lmNsY+HW41e wkRQ== X-Gm-Message-State: AOAM5318Kjqnkmn49mjbFbsMnjQXnwKKphTGclN5OD+8SyitmhWunguq AA5FeXe07EJVu9ET66cF6y8= X-Google-Smtp-Source: ABdhPJzMibIscMYd6Skqp8co24hFuzrDhC9iRJBFW9VL18tPYKcxDZAMDGKfipJJXvbkcfgeGZCoaw== X-Received: by 2002:a5d:4b87:: with SMTP id b7mr11184640wrt.586.1640563498393; Sun, 26 Dec 2021 16:04:58 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h3sm14010168wrt.94.2021.12.26.16.04.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Dec 2021 16:04:57 -0800 (PST) In-Reply-To: <85ilvb8fj8.fsf@ashwink.com.np> Content-Language: en-US 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:223167 Archived-At: On 26.12.2021 20:03, Ashwin Kafle wrote: > 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) 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.