From: Hong Xu <hong@topbug.net>
To: zsh-workers@zsh.org
Subject: [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 02:20:20 -0700 [thread overview]
Message-ID: <87h9quifqj.fsf@home.hong.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
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.
It seems that in vcs_info, the detection of each VCS is called:
(( found = 0 ))
for vcs in ${enabled} ; do
[[ -n ${(M)disabled:#${vcs}} ]] && continue
if (( ${+functions[VCS_INFO_detect_${vcs}]} == 0 )) ; then
printf 'vcs_info: configured unknown backend: '\''%s'\''\n' ${vcs}
printf 'vcs_info: use '\''vcs_info_printsys'\'' to find supported systems.\n'
continue
fi
vcs_comm=()
VCS_INFO_get_cmd
VCS_INFO_detect_${vcs} && (( found = 1 )) && break
done
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.
Hong
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next reply other threads:[~2015-05-30 9:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 9:20 Hong Xu [this message]
2015-05-30 11:13 ` Frank Terbeck
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=87h9quifqj.fsf@home.hong.me \
--to=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).