Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] vcs_info: add 'find-deepest' zstyle



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




Messages sorted by: Reverse Date, Date, Thread, Author