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

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

Oliver Kiddle wrote on Sat, 24 Oct 2020 04:31 +0200:
> 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. [...]
> 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.

So you'd like to assume that a single worktree will not cross into
nested mount points.

I'm not actually sure this is true every time.  For instance, if
a project's tree is huge and someone works only on part of it but has
multiple worktrees for that project, they might use bind mounts for the
parts of the tree they never touch; and conversely, people doing in-tree
builds might mount ramdisks inside their worktrees to generate the
object files and executables in, and then cd into those and expect to
still see the info for the enclosing worktree.

Whether any of these use-cases is a deal breaker is another question.

How about, if cwd is writable (in the access(W_OK) sense), stopping the
upwards crawl when reaching a directory that isn't writable?  This would
typically stop on «~/../».

> I don't have much use for nested repositories but vcs_info tends to be
> more use with git than subversion.

+1, primarily because git is much more stateful (e.g., interrupted



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