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#65704: 29.1; Most code of `project-ignores' seems to be dead code Date: Sun, 3 Sep 2023 03:26:48 +0300 Message-ID: References: <87sf7wlg07.fsf@cassou.me> 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="31920"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Damien Cassou , 65704@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 03 02:28:07 2023 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 1qcayE-00087F-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Sep 2023 02:28:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcay2-0005hw-Rv; Sat, 02 Sep 2023 20:27:54 -0400 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 1qcay0-0005hn-Sg for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 20:27:53 -0400 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 1qcay0-0003s8-FH for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 20:27:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcayA-0001fE-FF for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 20:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Sep 2023 00:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65704 X-GNU-PR-Package: emacs Original-Received: via spool by 65704-submit@debbugs.gnu.org id=B65704.16937008366337 (code B ref 65704); Sun, 03 Sep 2023 00:28:02 +0000 Original-Received: (at 65704) by debbugs.gnu.org; 3 Sep 2023 00:27:16 +0000 Original-Received: from localhost ([127.0.0.1]:38923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcaxP-0001e9-RS for submit@debbugs.gnu.org; Sat, 02 Sep 2023 20:27:16 -0400 Original-Received: from forward500a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:d500]:35424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcaxN-0001dr-3L for 65704@debbugs.gnu.org; Sat, 02 Sep 2023 20:27:14 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net [IPv6:2a02:6b8:c15:2c95:0:640:f90:0]) by forward500a.mail.yandex.net (Yandex) with ESMTP id 546A55E8D1; Sun, 3 Sep 2023 03:26:54 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id pQIZGR1DgmI0-Q8lg5Jfs; Sun, 03 Sep 2023 03:26:53 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1693700813; bh=sM6k4iW14DLQu4jzzBs5QMWtrxb3x5FCtbiGs7Jw0Xw=; h=In-Reply-To:From:Subject:Message-ID:References:Date:To; b=UOB+Q67hmGxed49Gqt8bQQLCrWmP23GYOY+LMCRpUDpRKEVgoODvnnTdsXoVzTcMo qFr6kXxiCpzd3xTKietnHV+NN4b2ON1ylh4UQpy4qJnruss6pIhCO7p9CnsxsqDScC nKS5dP3/pKTMKAP7jNWj4ugUOQ1EOAz9WRrL+/Uc= Authentication-Results: mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id A3FAA27C0054; Sat, 2 Sep 2023 20:26:51 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 02 Sep 2023 20:26:51 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeghedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughguhhtohhvseihrghnuggvgidrrhhuqeenucggtffrrghtth gvrhhnpeefieelveevvdfhgefgtdefhffhvedvgeffkedtffdvtdegtddvffelieetuedv gfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegugh huthhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeffeefleelheeh vddqvdelgeejjeejjeeiqdgughhuthhovheppeihrghnuggvgidrrhhusehfrghsthhmrg hilhdrtghomh X-ME-Proxy: Feedback-ID: ib1d9465d:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 2 Sep 2023 20:26:50 -0400 (EDT) Content-Language: en-US In-Reply-To: <87sf7wlg07.fsf@cassou.me> 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:269067 Archived-At: Hi Damien, Thanks for the patch, pushed to master (with a few amendments in summary). I'd like to backport it to emacs-29 as well, if Eli/Stefan don't mind. On 02/09/2023 19:03, Damien Cassou wrote: > Hi, > > The function `project-ignores' starts like this: > > (cl-defmethod project-ignores ((project (head vc)) dir) > (let* ((root (nth 2 project)) > backend) > (append > (when (and backend > (file-equal-p dir root)) > > It seems to me that `backend' is always going to be nil at this point > and thus the 25-line long `when' block will always return nil without > doing anything. > > Am I missing something? Not much. Maybe just that that code path isn't exercised by any in-tree function if the backend is Git (with recent enough git installed) or Hg (the project-files method uses faster, specialized shell invocations), so that might be the reason why this was missed in testing. Any chance you could tell us what made you notice the bug?