From: "Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>, 59722@debbugs.gnu.org
Subject: bug#59722: 30.0.50; project-find-regexp searches project-ignored files
Date: Sun, 11 Dec 2022 13:38:53 +0100 [thread overview]
Message-ID: <m24ju2nmhu.fsf@me.com> (raw)
In-Reply-To: <0810182a-7808-5c7b-91f9-bc76374c3263@yandex.ru>
Dmitry Gutov <dgutov@yandex.ru> writes:
>> ((nil . ((project-ignores . ("apps/**/*.scm")))))
>
> project-vc-ignores, you mean.
Correct. Dmitry, I apologize for causing confusion!
>> Emacs ends up calling
>>
>> git ls-files -z -c --exclude-standard \
>> --no-empty-directory -o -- :(exclude,glob,top)apps/**/*.scm
>>
>> [...]
>
> Huh, interesting. Could you try to show a similar command invocation
> which would make Git output include a "logically empty" directory for
> 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
--
"The introduction of suitable abstractions is our only mental aid to
organize and master complexity."
-- Edsger Wybe Dijkstra, 1930-2002
Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia
next prev parent reply other threads:[~2022-12-11 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 14:35 bug#59722: 30.0.50; project-find-regexp searches project-ignored files Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-30 15:09 ` Dmitry Gutov
2022-11-30 23:20 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-30 23:30 ` Dmitry Gutov
2022-12-04 23:36 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-05 0:43 ` Dmitry Gutov
2022-12-09 16:21 ` Dmitry Gutov
2022-12-11 12:38 ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-12-11 20:13 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24ju2nmhu.fsf@me.com \
--to=bug-gnu-emacs@gnu.org \
--cc=59722@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=salutis@me.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).