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

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 29 Oct 2023 05:37:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Fixed in version 30.1

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 66806 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, 66806 <at> debbugs.gnu.org
Subject: Re: bug#66806: 30.0.50; [PATCH] 'project-find-regexp' passes Git
 submodules to the search program
Date: Sun, 29 Oct 2023 17:58:01 -0700
[Message part 1 (text/plain, inline)]
On 10/29/2023 2:41 PM, Dmitry Gutov wrote:
> And that's not to mention usage over Tramp (which would be affected by 
> the +1 process call that you mentioned as well, but that seems 
> unavoidable).

Yeah, I don't see a way around that, unless we constructed a complex 
command to run via Tramp that does it all in one go.

(I looked into using the "--stage" argument for "git ls-files", which 
gets most of the way to fixing this, but you could break that logic with 
evil file names not in the tree...)

> Anyway, after recent experience micro-optimizing list operations, I came 
> up with this version where the impact seems minimal.
> 
> WDYT?

Thanks, that helped form the basis for the attached patch. It moves the 
'member' call into the lambda for the original 'mapcar', and then we can 
just 'delq' all the nil elements. Benchmarking against the Emacs repo, 
this still seems to have a minimal perf impact.

There might also be a benefit to using "git ls-files 
--recurse-submodules" when we can (i.e. when not using "-o"), but maybe 
we can leave that optimization for another day.
[0001-Exclude-Git-submodules-from-project-files.patch (text/plain, attachment)]

This bug report was last modified 1 year and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.