From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index Date: Wed, 18 Sep 2024 01:54:17 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35626"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Sean Allred , 73320@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 18 00:55:01 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqh64-00097m-56 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Sep 2024 00:55:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqh5s-0003Dq-Tm; Tue, 17 Sep 2024 18:54:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqh5r-0003DR-9y for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:54:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqh5r-0004dw-13 for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:54:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=aaLlRPZVHvunSrkot59WWpoIOe0X6TtJQpkgiyaf6M4=; b=iTOfBdODooMGS3pKkU4y3Jv0r6c0SaO8mxt8Mzt0mEzcryO58Q8dNt7Rr8Y4EEU1oohW2WWCXp6vtsmyMBqEaCwKihGWRPRoUFrKb0PQXgRtadh8zVFiLieZrK0E2e3n/Kbm3PgjjNfzUCtrdhF2qIuXLlGbMi84tR16qVtDvzNhGMoHZ2AdVCM8HJkyi79HJBUuW2YWsqYxVmzthjsLhejrTCCBYzdThq0ldiIAfh8E+YyffqHdUoiZfp6486KLxAO6r0oD70LCHfW/2QyE2cyxYSdG++brvRz0WpwX6t/6+55I778JAvCJ4mnYI+MDWy6pLglEWoJjTE+mcwSVBw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqh66-00030l-7J for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 18:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2024 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73320 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73320-submit@debbugs.gnu.org id=B73320.172661368511541 (code B ref 73320); Tue, 17 Sep 2024 22:55:02 +0000 Original-Received: (at 73320) by debbugs.gnu.org; 17 Sep 2024 22:54:45 +0000 Original-Received: from localhost ([127.0.0.1]:56207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqh5p-000304-4z for submit@debbugs.gnu.org; Tue, 17 Sep 2024 18:54:45 -0400 Original-Received: from fhigh7-smtp.messagingengine.com ([103.168.172.158]:57547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqh5m-0002zq-CM for 73320@debbugs.gnu.org; Tue, 17 Sep 2024 18:54:43 -0400 Original-Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.phl.internal (Postfix) with ESMTP id 882C51140214; Tue, 17 Sep 2024 18:54:20 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Tue, 17 Sep 2024 18:54:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1726613660; x=1726700060; bh=aaLlRPZVHvunSrkot59WWpoIOe0X6TtJQpkgiyaf6M4=; b= ax3YNxE6l/n5otYBopvxBoBGJSgjPwDMMJ/qjGxSSz5nPhkKDgGFTF+gqzmlIVoB lrzJmz8+/c8IuiepTEESSpzhKxGy3eleL+YiPZlK0Ygk8ehAXg3Yv1UuH56bufip 7+RJH9OzefQFma9mdzefBEUp0bDbjpJ55HuVf0/cdZR77A3e3laH3GHoFNQ+lIl7 IeNZg5iiy9rrEwth17rUXeRT4A16Nssk3IvATlRN5rJYAxOtu1plPmhdzF2/+sU6 wQfdFuguPW52TcBOh8kURvNnBOd0eI8Grpbhh1cKrs8uAeNJZREeeAMg2tNO3iYX 6iq6XLeiEBeCWKsId1D9rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1726613660; x= 1726700060; bh=aaLlRPZVHvunSrkot59WWpoIOe0X6TtJQpkgiyaf6M4=; b=F er0QJsejE1ls/AXHk2k0QAJt5VX0rf7j8zVY643rDganN10/L/t058tDis6DGZ84 zC1J7Oh9WETL3LQdDZQLiRy+UJ246TWnxyqnfkeML1BawK7RR/Q1+cAXSLILzF6f FCDECN+A3LoW2/4wFz5wWn/D3G+qZA717vuMSVd70TqEQeTZMneGdh7ifqBO5ebK j5iqyDUEjbjtlJCZx9WodjtPviRTo48hvRBk7tH8YwO+QO567+U7rD38XDHeA9TZ rjKeCjFrqHkBjGvkydNup4CSxGQEqVGRgGa4QjttWOUzG5L8tPI1GXaKjfBSM+2M 22XitJiNBM85MzV4kVzAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudekkedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpedthfeuvddtveelgeeuleevvdejveehffevveehvdeu ffdtfefhvdeugefgtefgtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghllhhrvggurdhsvggrnhesgh hmrghilhdrtghomhdprhgtphhtthhopeejfeefvddtseguvggssghughhsrdhgnhhurdho rhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Sep 2024 18:54:19 -0400 (EDT) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291982 Archived-At: 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.