From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28203 invoked from network); 24 Oct 2020 02:31:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Oct 2020 02:31:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=b4isyvsZg4lPahcWn5LnLVafdTjO3TCQUBKGlGZVLME=; b=YyGY171EmTyCgh8+pP2OWfFuZc Jyv62czt8mK9ko7u0ysM8zluYwJt4vEDJoWujMCGTXil587YfWS3HpiMFOEAJvEjFKjXiDsRQt8IJ g1144+PPUm3wr96uDA08PlFLYjl0TfCwJYAWKiGsYZ6d8gv0ZJS3deOZXRe4AMoQMMhdIh+VvJ30j xIX77fe71i8jSstQL+OAfq1FaZdFJvZP63xzEgMhORrvMpbFFiYaHjvj/NoQ1Ai9EWxrYZwQFLTsM 1XHYKrhsaH3sJFmztOEtq+058gGgW4d20r4rX1vgc/Z9WjOl6evXIH2fK+Vr6aQwSss+2k9l2IOqt VGjWv8mg==; Received: from authenticated user by zero.zsh.org with local id 1kW9LE-000NV7-Pr; Sat, 24 Oct 2020 02:31:36 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1kW9Kx-000NNB-Tj; Sat, 24 Oct 2020 02:31:22 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.93.0.4) (envelope-from ) id 1kW9Kx-0009fV-4K; Sat, 24 Oct 2020 04:31:19 +0200 cc: zsh-workers@zsh.org In-reply-to: <87mu0clbw2.fsf@ft.bewatermyfriend.org> From: Oliver Kiddle References: <20201023083444.1565608-1-mezin.alexander@gmail.com> <20201023234855.5a0c6290@tarpaulin.shahaf.local2> <87mu0clbw2.fsf@ft.bewatermyfriend.org> To: Frank Terbeck Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <37167.1603506679.1@hydra> Date: Sat, 24 Oct 2020 04:31:19 +0200 Message-ID: <37168-1603506679.130606@RR8o.26Eg.GGvC> X-Seq: 47492 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Frank Terbeck wrote: > What the current behaviour permits is to set the enable style in the > order of probability. That way the most common system you use gets > checked first, cutting down on detection time. Since some systems take a > fair bit of time to do detection, I deemed this reasonable at the time > this was written. And like I said, I think this is still the preferable > default choice. Long detection times can still very much be a problem. At both home and work, I use automount and NFS home directories so the NFS server regularly gets queried for non-existent homes named .git etc. It isn't just vcs_info that does this. At work, people using /net had to be redirected where vscode in particular was generating excessive DNS requests - with dots in some names making that especially bad. I suspect some of this could be avoided by doing something similar to the find -xdev option to stop searching when a different filesystem is reached. It might also be more efficient to search for all of .git, .svn, CVS etc in tandem, especially where the behaviour of stopping at the first (deepest) one is used. Can we do better by doing the scan in C? A dedicated module for this would seem quite reasonable. Or maybe globs could suffice. I've pondered in the past about some sort of glob shortcut for (../)# and perhaps a way to prevent it crossing filesystems. I don't have much use for nested repositories but vcs_info tends to be more use with git than subversion. Oliver