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#68443: 30.0.50; Cannot commit from *vc-diff* if there is a deleted file. Date: Wed, 17 Jan 2024 13:36:53 +0200 Message-ID: References: <874jfhe3r4.fsf@disroot.org> <9dfe6be4-afa8-430e-a45e-e651c479cb81@gutov.dev> <877ck82ppz.fsf@disroot.org> 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="2401"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 68443@debbugs.gnu.org To: Aleksandr Vityazev , Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 17 12:38:20 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 1rQ4FP-0000OF-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 17 Jan 2024 12:38:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQ4F8-0005VO-Rn; Wed, 17 Jan 2024 06:38:02 -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 1rQ4F7-0005VG-Pa for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2024 06:38:01 -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 1rQ4F7-0005xZ-GX for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2024 06:38:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQ4F8-0008SF-1Y for bug-gnu-emacs@gnu.org; Wed, 17 Jan 2024 06:38: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: Wed, 17 Jan 2024 11:38:02 +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.170549142832436 (code B ref 68443); Wed, 17 Jan 2024 11:38:02 +0000 Original-Received: (at 68443) by debbugs.gnu.org; 17 Jan 2024 11:37:08 +0000 Original-Received: from localhost ([127.0.0.1]:50982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQ4EG-0008R6-5q for submit@debbugs.gnu.org; Wed, 17 Jan 2024 06:37:08 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQ4EE-0008QZ-7t for 68443@debbugs.gnu.org; Wed, 17 Jan 2024 06:37:07 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 217285C00F9; Wed, 17 Jan 2024 06:36:58 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 17 Jan 2024 06:36:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1705491418; x=1705577818; bh=SrG6H5LHnWmhPvti/+U5WUH/k19C4IgfXwzEvzOm4Mw=; b= agKdm7fe5wQU2T0oAhFI9QsgqTNPC4OiV4PxZseFrZIsmmfylZtfwXeJQ1g+QivZ pMC7EOXUp3GDt/LEpNxVW4veJHIMKlgKqGJJpq8EDxfR+w8Y3xINiDSfOFLAj2E3 /HsN2Ks6bnw5rBIBR5jM6EdybGn9zuQ0eBkm1JyEXAkkY0Bv99uTrPwdOwRqYjcw fhxcjL+PN67OrHroA/sabs4KNxbZGR9dhWRCiTNpam3m7Xgola1Ri4T/Ez9tDS/h kGKWZYGbBK1hsqPgaGrvrKhdamAW1ui+6FfoRbYRAbiEUJpFUQW5USbFjIwWpV8Q 9W6cSo20Zk/1azIhEVBS+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705491418; x= 1705577818; bh=SrG6H5LHnWmhPvti/+U5WUH/k19C4IgfXwzEvzOm4Mw=; b=U Ru7iwQhhhFAshEh5Bn/uVAaNKUgDb28OPMpdWyIpfxx+GT0ZRjZDnPJwZHnF4LE1 bv8oHVv4aquQ+/Aq2WvGuMQhylQtv2MAl1aEjounmFBEecBb/8k4FM1NVJhBxkoy iAmy5SaFNF22Kn/m/Og0/E3THrm+qsuBby9B/D4rcyUlQ6K9MhEklvMiqpxLK/hM BKUL6gRsehTDzqCyq/B9t+lyJMitUziOjZhSe3fiFqctxil0hfAyCLPlZ6UWI/04 U/QrMOmGDIKv8zZen3Xep04O+SmZoUUsSLVRNz85tZzXuBih4Uqu0o8UmE9ts+jA f+9tsgNbuKZ2D75rU95xQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejhedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Jan 2024 06:36:56 -0500 (EST) Content-Language: en-US In-Reply-To: <877ck82ppz.fsf@disroot.org> 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:278382 Archived-At: On 17/01/2024 12:56, Aleksandr Vityazev wrote: > On 2024-01-17 06:25, Dmitry Gutov wrote: > >> Hi! Thanks for the report. >> >> On 13/01/2024 15:56, Aleksandr Vityazev via Bug reports for GNU Emacs, >> the Swiss army knife of text editors wrote: >>> Hi, >>> Steps to reproduce with emacs -q: >>> 1. Enter git repository; >>> 2. vc-delete-file some file; >>> 3. vc-root-diff; >>> 4. From *vc-diff* buffer vc-next-action; >>> 5. In *vc-log* write summary and invoke vc-next-action; >>> 6. get error (wrong-type-argument stringp nil) >>> Full backtrace: >>> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >>> file-directory-p(nil) >>> #f(compiled-function (files comment) #>> 0x1e31e0a127714b22>)((#(".gitignore" 0 10 (fontified t face >>> (diff-file-header diff-header))) #("buffer.c" 0 8 (fontified t face >>> (diff-file-header diff-header))) nil) #("Summary: Delete file.\n" 0 >>> 8 (jit-lock-defer-multiline t face log-edit-header fontified t field >>> header) 8 9 (jit-lock-defer-multiline t fontified t field header) 9 >>> 21 (jit-lock-defer-multiline t face log-edit-summary fontified t >>> field header) 21 22 (fontified t))) >>> vc-finish-logentry() >>> funcall-interactively(vc-finish-logentry) >>> log-edit-done() >>> funcall-interactively(log-edit-done) >>> command-execute(log-edit-done) >> >> Try the patch below, seems to work here: >> >> diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el >> index 03efe0fdb31..83d580d98dd 100644 >> --- a/lisp/vc/diff-mode.el >> +++ b/lisp/vc/diff-mode.el >> @@ -3014,7 +3014,7 @@ diff-vc-deduce-fileset >> (goto-char (point-min)) >> (while (progn (diff-file-next) (not (eobp))) >> (push (diff-find-file-name nil t) files))) >> - (list backend (nreverse files) nil nil 'patch))) >> + (list backend (delete nil (nreverse files)) nil nil 'patch))) > > 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. Splitting reports should not be necessary, but we can install the first fix separately.