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

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



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: signature.asc
Description: PGP signature



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