From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59722: 30.0.50; project-find-regexp searches project-ignored files Date: Sun, 11 Dec 2022 13:38:53 +0100 Message-ID: References: <9de53f42-8f76-3770-b059-d78a5252d31a@yandex.ru> <1f6b991a-d67e-5e38-b77f-038e97218e4e@yandex.ru> <0810182a-7808-5c7b-91f9-bc76374c3263@yandex.ru> Reply-To: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31182"; mail-complaints-to="usenet@ciao.gmane.io" To: Dmitry Gutov , 59722@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 13:40:18 2022 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 1p4Lcv-0007wv-CN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 13:40:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4Lcl-00064k-7f; Sun, 11 Dec 2022 07:40:07 -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 1p4Lcj-00064K-Ec for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 07:40:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4Lcg-0006U7-8N for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 07:40:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4Lcf-0003wj-Tv for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 07:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2022 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59722 X-GNU-PR-Package: emacs Original-Received: via spool by 59722-submit@debbugs.gnu.org id=B59722.167076234715149 (code B ref 59722); Sun, 11 Dec 2022 12:40:01 +0000 Original-Received: (at 59722) by debbugs.gnu.org; 11 Dec 2022 12:39:07 +0000 Original-Received: from localhost ([127.0.0.1]:46390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Lbm-0003wH-N7 for submit@debbugs.gnu.org; Sun, 11 Dec 2022 07:39:06 -0500 Original-Received: from mr85p00im-ztdg06011101.me.com ([17.58.23.185]:60778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4Lbk-0003vt-D7 for 59722@debbugs.gnu.org; Sun, 11 Dec 2022 07:39:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1670762337; bh=0TJnYEDkvDGd1pxeoYEe3OzRaYR+IU3r8OQyTHDQMPs=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=0E9sxoDWLfbjTTt2uQCbWuNLFsHsONXBt2kUaQzNgkWKjT6i88EROu52aB0AsQZ0U CMWdcD+RDQ4rf4S+oUTGkNrabbizgOQL9KjkZORt0f4ZsxZ92BDGB4Xt61b1BSJq5u iWsBv+ag0ud3MakJH7npscBdBZWEiq1hSoxS9H3qyDXpZw5m/Wvpu5WoX3k62Y9ATJ Xv3QH9naY6URnwVk2SxvcSuI0+nCWbLuY4tMgVqYfmU3wntjjf0aad324v9WWrqv3n 3272p0s7IMCFR1irdXPmOkugDVhi6zfd+HiT4NrjweIwGZ3bzYF8WvAuquwbN7fodF k96/Wz+KWFoug== Original-Received: from Rudolfs-MacBook-Air.local (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06011101.me.com (Postfix) with ESMTPSA id 13EC5DA39D7; Sun, 11 Dec 2022 12:38:56 +0000 (UTC) In-Reply-To: <0810182a-7808-5c7b-91f9-bc76374c3263@yandex.ru> X-Proofpoint-GUID: 440WsAEUWT_c2UtvGgvviaf549fba9CW X-Proofpoint-ORIG-GUID: 440WsAEUWT_c2UtvGgvviaf549fba9CW X-Proofpoint-Virus-Version: vendor=fsecure engine=1.1.170-22c6f66c430a71ce266a39bfe25bc2903e8d5c8f:6.0.138, 18.0.816, 17.11.62.513.0000000 definitions=2022-01-18_01:2020-02-14_02, 2022-01-18_01, 2021-12-02_01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 clxscore=1015 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2212110116 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:250602 Archived-At: Dmitry Gutov writes: >> ((nil . ((project-ignores . ("apps/**/*.scm"))))) > > project-vc-ignores, you mean. Correct. Dmitry, I apologize for causing confusion! >> Emacs ends up calling >>=20 >> git ls-files -z -c --exclude-standard \ >> --no-empty-directory -o -- :(exclude,glob,top)apps/**/*.scm >>=20 >> [...] > > Huh, interesting. Could you try to show a similar command invocation=20 > which would make Git output include a "logically empty" directory for=20 > the Emacs repo? So that we have a common public project to compare. I could not reproduce the problem with the Emacs source directory, but I did not give up! And, after a whole lot of head-scratching, I found the root cause of the problem: When `git ls-files' finds a symlink that points to a directory, it does *not* follow it. Instead, it lists it in the output. In my case, the symlink pointed to a directory with all of its files ignored. However, and importantly, upon further testing, I found that ignores do *not* matter. In summary, any symlinks to directories shallow-appear in `git ls-files' outputs. Emacs hands the list to Ripgrep, and Ripgrep follows symlinks, possibly searching through ignored directories, effectively ignoring `project-vc-ignores' from the point of view of the user. Phew! Rudy --=20 "The introduction of suitable abstractions is our only mental aid to organize and master complexity." -- Edsger Wybe Dijkstra, 1930-2002 Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25 84103 Bratislava Slovakia