1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-04 09:01:06 +01:00

Frank Terbeck: 27353: more VCS_Info sanity checks

This commit is contained in:
Peter Stephenson 2009-11-06 14:35:33 +00:00
parent 39e4cfd4db
commit d6c4e4c692
3 changed files with 9 additions and 1 deletions

View file

@ -8,6 +8,7 @@ local basedir="." realbasedir
realbasedir="$(VCS_INFO_realpath ${basedir})"
while [[ ${realbasedir} != '/' ]]; do
[[ -r ${realbasedir} ]] || return 1
if [[ -n ${vcs_comm[detect_need_file]} ]] ; then
[[ -d ${basedir}/${dirname} ]] && \
[[ -e ${basedir}/${dirname}/${vcs_comm[detect_need_file]} ]] && \

View file

@ -41,6 +41,8 @@ vcs_info () {
emulate -L zsh
setopt extendedglob
[[ -r . ]] || return 0
local pat
local -i found
local -a enabled disabled dps