zsh-workers
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: Hong Xu <hong@topbug.net>
Cc: zsh-workers@zsh.org
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	[thread overview]
Message-ID: <87617axqqn.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <87h9quifqj.fsf@home.hong.me> (Hong Xu's message of "Sat, 30 May 2015 02:20:20 -0700")

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


      reply	other threads:[~2015-05-30 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-30  9:20 Hong Xu
2015-05-30 11:13 ` Frank Terbeck [this message]

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=87617axqqn.fsf@ft.bewatermyfriend.org \
    --to=ft@bewatermyfriend.org \
    --cc=hong@topbug.net \
    --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).