From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73320: [PATCH] project--vc-list-files: use Git's sparse-index Date: Thu, 19 Sep 2024 08:41:01 +0300 Message-ID: <868qvo9p5e.fsf@gnu.org> References: <73758f39-1e18-471a-9dfb-0ceade12dacf@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1064"; mail-complaints-to="usenet@ciao.gmane.io" Cc: allred.sean@gmail.com, 73320@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 19 07:41:55 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 1sr9vP-00005i-HX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Sep 2024 07:41:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sr9vH-00023q-RN; Thu, 19 Sep 2024 01:41: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 1sr9vF-00023J-EP for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:41:45 -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 1sr9vF-0005gR-5l for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:41:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=a6Q5gwr2u8xYNEf3G1NFZ27weEmHwYOrxzQ+ePqwMIM=; b=J2ItKivUj4obJPhzRyu/D/L5yzIxnyYEvu+KFTW/4IPLptw1l24tIHgUBLIBnBZs49yzHKWftgRbP9CQ6Gc7V0oXYIJ9ZHgL1OIitemUXPkVtx1Sm4r3DYkxaGAtb1b23PYNZO4pbcZnyxgKYNaRn6C52YtGoNVm3yy8ws+KSo8Su2LBVCu+rSptkfwAHWyUUE/ARLzsnV2Yb8OK6udqVXizHbMYCrJr1bQX3jxT2FPU2ph/efhlyi+qZ11tYbLgxOss3mbc9msqKyp/Ed/sUt24warWf/Ut0ws0xwyyoIt736YwKVWuYf4L+vcivNC7q2ldxijvToL+dleGunreug==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sr9vW-00072r-46 for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 05:42: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.172672448927023 (code B ref 73320); Thu, 19 Sep 2024 05:42:02 +0000 Original-Received: (at 73320) by debbugs.gnu.org; 19 Sep 2024 05:41:29 +0000 Original-Received: from localhost ([127.0.0.1]:59629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr9uy-00071j-OJ for submit@debbugs.gnu.org; Thu, 19 Sep 2024 01:41:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr9uv-00071Q-TN for 73320@debbugs.gnu.org; Thu, 19 Sep 2024 01:41:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sr9uZ-0005fC-CN; Thu, 19 Sep 2024 01:41:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=a6Q5gwr2u8xYNEf3G1NFZ27weEmHwYOrxzQ+ePqwMIM=; b=dE9mTveGHSre XxfEzyJWOX/o4VUqUxQ9jAjXdD3T+6QvaVfW44SBdnNs8iz5+gxteChnWscZVheCRX8TOi3Ur9lQy W5iSPkOV4obislb+59P3VmRzGKWj21bSRhXZ/9uLHJWqEPrFX2RL8wfGKb28DTAkqd7cmJ9JfDaIT 2XW9bewIA1LAh5kdEC0ObYoPcjbgxEc358i1IBOERyfLkMl1Y5msPCjCmlF9tBjVbJXB26Mn4blzn AuVqPCagsr0+AJtPWEuc2IJ4LOEtpF8kfiVgiZC8UjfBh4nk7dJziXJhiDo7zrwaMIxidvLwsusVT vDF9nUGmrFqaZdzSKXCLlg==; In-Reply-To: <73758f39-1e18-471a-9dfb-0ceade12dacf@gutov.dev> (message from Dmitry Gutov on Thu, 19 Sep 2024 01:27:03 +0300) 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:292030 Archived-At: > Cc: 73320@debbugs.gnu.org > Date: Thu, 19 Sep 2024 01:27:03 +0300 > From: Dmitry Gutov > > - (unless (member file submodules) > + (unless (or (member file submodules) > + (eq ?/ (aref file (1- (length file))))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Why not use directory-name-p here? > > Incidentally looking at the version check within `project-files`, it's > > worthwhile to point out that `--sparse` is likely /not/ compatible with > > ancient versions of Git. Does vc have any sort of policy on requiring > > recent versions of these tools? If the answer is 'not really', I'll > > additionally want to add some sort of protection against using > > `--sparse` when the Git version won't understand it. This should be easy > > enough to do within the implementation of `project--vc-list-files`. > > IIRC it was something like "should work on the CentOS stable", and maybe > CentOS N-1 as well. But the release-based distro was discontinued since > the last time this question came up ;-( > > We can call vc-git--program-version the same way it's used in > vc-git-state. Which version should we make the minimum? In which version was --sparse support introduced, and what is considered "ancient" for this purpose? I would not like us to rely on shining new features of Git if the price is to break people who have older versions. TRT in these cases is to probe the version and act accordingly, using the new features only when they are supported.