Subject: bug#66806: 30.0.50; [PATCH] 'project-find-regexp' passes Git submodules to the search program

From: Dmitry Gutov <[email-masked]>
Date: Mon, 30 Oct 2023 00:02:48 +0200

On 29/10/2023 07:36, Jim Porter wrote:
> (Looking at the definition for ripgrep, I'm guessing the "-g '!*/'" is 
> the trick for that program, but nothing similar works for ag.)

Actually, it's a failed solution which I copied from the rg's issue 
tracker but I didn't test it enough or it broke in some later versions, 
and then I put off dealing with it when finally noticed. Maybe it never 
worked and only could filter out directories when those are passed with 
a trailing slash.

What should work, is adding the argument "--max-depth 0" (stopping the 
traversal of passed directories). For ag, the corresponding fix seems to 
be "--depth 0", but I haven't tested that in practice.

Anyway, see the other email, which should make it all unnecessary 
(unless you have a 3rd party package which has to work with older 
project.el too).