GNU bug report logs - #73320
[PATCH] project--vc-list-files: use Git's sparse-index

Previous Next

Package: emacs;

Reported by: Sean Allred <allred.sean <at> gmail.com>

Date: Tue, 17 Sep 2024 16:57:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sean Allred <allred.sean <at> gmail.com>
Subject: bug#73320: closed (Re: bug#73320: [PATCH] project--vc-list-files:
 use Git's sparse-index)
Date: Sun, 29 Sep 2024 01:21:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#73320: [PATCH] project--vc-list-files: use Git's sparse-index

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 73320 <at> debbugs.gnu.org.

-- 
73320: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73320
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Sean Allred <allred.sean <at> gmail.com>
Cc: 73320-done <at> debbugs.gnu.org
Subject: Re: bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index
Date: Sun, 29 Sep 2024 04:19:34 +0300
Hi Sean,

So I've pushed a slightly tweaked version of your last patch (without 
the 'cond') to master, commit 8d9a4647fbc, it seems to handle all of the 
requirements discussed.

Please test it out when you have the time, and of course any further 
suggestions and improvements are welcome.

[Message part 3 (message/rfc822, inline)]
From: Sean Allred <allred.sean <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] project--vc-list-files: use Git's sparse-index
Date: Tue, 17 Sep 2024 11:55:43 -0500
[Message part 4 (text/plain, inline)]
Tags: patch

Hello!

I noticed that `C-x p f` (M-x project-find-file) took an incredibly long
time to run on our monorepo -- even when using a sparse index -- and I
tracked the problem down to this function. Adding `--sparse` to the
`git-ls-files` invocation resolves the issue handily, albeit with the
quirk of still showing top-level directories that are excised from the
sparse index (which we may want to remove from the return value of this
function since it does say it returns /files/).

I'm expecting at least one more version of this patch before it's even
considered for merge. Given that this change removes many, many results
from the return value of `project--vc-list-files', I suspect this would
be a breaking change for some use case that I'm not considering. I'm
hoping the list can provide some feedback on the best way to make this
configurable. I've not really hacked in project.el before and am not
super familiar with its internals.

If you prefer, you may pull this patch from my fork on github at

    url: git <at> github.com:vermiculus/emacs.git
    branch: sa/sparse-index

Keep in mind I may be updating this branch with feedback from this list
as it comes in.

-Sean


In GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, NS
 appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2023-07-30 built on
 armbob.lan
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.6.1

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

[0001-project-vc-list-files-use-Git-s-sparse-index.patch (text/patch, attachment)]
[Message part 6 (text/plain, inline)]
-- 
Sean Allred

This bug report was last modified 226 days ago.

Previous Next


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