From: Dmitry Gutov <dmitry@gutov.dev>
To: Sean Allred <allred.sean@gmail.com>, 73320@debbugs.gnu.org
Subject: bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index
Date: Wed, 18 Sep 2024 01:54:17 +0300 [thread overview]
Message-ID: <b873814b-9b14-4bbd-b6d0-1813c3cc3f0e@gutov.dev> (raw)
In-Reply-To: <m0h6aenrsg.fsf@epic96565.epic.com>
Hi!
On 17/09/2024 19:55, Sean Allred wrote:
> 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.
That sounds like a good problem to try to solve.
> 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/).
The submitted patch has a comma inside which results in an error
vc-delistify: Wrong type argument: characterp, \,
Removing it fixes the error.
But let's start from the beginning. Could you help me set up a sparse
repo that would help test out the change?
I took a large-ish checkout with shallow history and set up the sparse
config like this:
git sparse-checkout init --cone
git sparse-checkout set gfx media
With that, both 'git status' and 'ls' behave as expected - no extra
directories around (just the top-level files and two subdirs).
But 'git ls-files' and 'git ls-files --sparse' continue to show the same
large output. Any idea what could be wrong? My version of Git, perhaps?
Which is 2.40.1.
> 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.
Yeah, I expect project-find-regexp, project-search,
project-query-replace-regexp might start misbehaving without additional
filtering -- either throwing up errors or, best case, continuing to
search through the "hidden" directories.
next prev parent reply other threads:[~2024-09-17 22:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 16:55 bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index Sean Allred
2024-09-17 22:54 ` Dmitry Gutov [this message]
2024-09-18 0:36 ` Sean Allred
2024-09-18 22:27 ` Dmitry Gutov
2024-09-19 4:25 ` Sean Allred
2024-09-19 9:44 ` Dmitry Gutov
2024-09-19 5:41 ` Eli Zaretskii
2024-09-19 9:34 ` 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=b873814b-9b14-4bbd-b6d0-1813c3cc3f0e@gutov.dev \
--to=dmitry@gutov.dev \
--cc=73320@debbugs.gnu.org \
--cc=allred.sean@gmail.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).