From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Thu, 18 Jan 2024 09:50:44 +0200 Organization: LINKOV.NET Message-ID: <868r4nqf5n.fsf@mail.linkov.net> References: <874jfhe3r4.fsf@disroot.org> <9dfe6be4-afa8-430e-a45e-e651c479cb81@gutov.dev> <877ck82ppz.fsf@disroot.org> <86ttnc2iu5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30293"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68443@debbugs.gnu.org, Aleksandr Vityazev To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 18 09:06:21 2024 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 1rQNPp-0007d6-FY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jan 2024 09:06:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQNPa-0004fy-Q7; Thu, 18 Jan 2024 03:06:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQNPX-0004eY-Rc for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 03:06:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQNPU-0004Ud-Aw for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 03:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQNPV-0002Zw-OQ for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 03:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jan 2024 08:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68443 X-GNU-PR-Package: emacs Original-Received: via spool by 68443-submit@debbugs.gnu.org id=B68443.17055651459890 (code B ref 68443); Thu, 18 Jan 2024 08:06:01 +0000 Original-Received: (at 68443) by debbugs.gnu.org; 18 Jan 2024 08:05:45 +0000 Original-Received: from localhost ([127.0.0.1]:54281 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQNPF-0002ZR-5n for submit@debbugs.gnu.org; Thu, 18 Jan 2024 03:05:45 -0500 Original-Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:33027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQNPC-0002ZB-4U for 68443@debbugs.gnu.org; Thu, 18 Jan 2024 03:05:42 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2958A60006; Thu, 18 Jan 2024 08:05:30 +0000 (UTC) In-Reply-To: <86ttnc2iu5.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 17 Jan 2024 18:32:50 +0200") X-GND-Sasl: juri@linkov.net 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278426 Archived-At: >>> Yes with this patch the error is no longer present, but the deleted file >>> is not displayed in the *log-edit-files* buffer, unlike if you run >>> vc-next-action from *vc-dir*. Although this is another bug report. >> >> Right, that's still a remaining problem. diff-find-file-name doesn't really >> want to "find" files that don't exist on disk, so it might need >> a replacement for such cases. > > Indeed, the problem is that diff-find-file-name doesn't get the name > of the deleted file even when called with OLD=t: > > ;; Use file-regular-p to avoid > ;; /dev/null, directories, etc. > ((or (null file) (file-regular-p file)) > file) This can be fixed by adding special-casing to diff-vc-deduce-fileset that will check whether the diff output is for git diff, then will remove a/ and b/ prefixes from file names without checking whether these files really exist.