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

Re: [BUG] vcs_info_msg_[01]_ is not set correctly in a hg repository which is in a subdirectory of a git repository

Hong Xu wrote:
> If we have a directory tree like the following:
> - .git
> |
>  -- .hg
> vcs_info_msg_[01]_ are not set correctly. The hg repository is ignored
> and only the git repository is recognized. I have enabled both git and
> hg for vcs_info.
> Instead, to get the correct result, one should detect current directory
> for all VCS, then one level up and detect all VCS again, until '/' is
> met.

Sorry, to gain the best possible performance, vcs_info elects to take
shortcuts with systems that allow it. Git for example provides such a
shortcut, in that you can ask it if the current directory is a git
working directory.

In order to make this work, you can put hg before git in the "enable"
style in your configuration. You can even have "enable" be an
"evaluated" style to set its value depending in your current directory.

I am firmly against performing possibly complex and expensive detection
to support nested version control situations.

Regards, Frank

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