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
- X-seq: zsh-workers 35337
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Hong Xu <hong@xxxxxxxxxx>
- Subject: Re: [BUG] vcs_info_msg_[01]_ is not set correctly in a hg repository which is in a subdirectory of a git repository
- Date: Sat, 30 May 2015 13:13:36 +0200
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <87h9quifqj.fsf@home.hong.me> (Hong Xu's message of "Sat, 30 May 2015 02:20:20 -0700")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <87h9quifqj.fsf@home.hong.me>
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