zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Frank Terbeck <ft@zsh.org>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] vcs_info: add 'find-deepest' zstyle
Date: Sat, 24 Oct 2020 04:31:19 +0200	[thread overview]
Message-ID: <37168-1603506679.130606@RR8o.26Eg.GGvC> (raw)
In-Reply-To: <87mu0clbw2.fsf@ft.bewatermyfriend.org>

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


  parent reply	other threads:[~2020-10-24  2:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-23  8:34 Aleksandr Mezin
2020-10-23 23:48 ` Daniel Shahaf
2020-10-24  0:13   ` Frank Terbeck
2020-10-24  0:56     ` Bart Schaefer
2020-10-25 20:04       ` Daniel Shahaf
2020-10-24  2:31     ` Oliver Kiddle [this message]
2020-10-25 19:54       ` Daniel Shahaf
2020-10-25 23:13         ` Frank Terbeck
2020-10-26 20:58           ` Daniel Shahaf
2020-10-27  1:01             ` Frank Terbeck
2020-11-04  8:42               ` Daniel Shahaf
2020-10-28  1:33   ` Aleksandr Mezin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37168-1603506679.130606@RR8o.26Eg.GGvC \
    --to=opk@zsh.org \
    --cc=ft@zsh.org \
    --cc=zsh-workers@zsh.org \
    /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.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).