From 8e2e64f0b9bdbfe0452e17a7ae0bb31eafb5203a Mon Sep 17 00:00:00 2001 From: Marcel Hoyer Date: Sun, 22 Jan 2012 23:28:34 +0100 Subject: [PATCH] * fixed _scm_get_scm_type for long waiting when checking / (root) for scm type --- lib/scm.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/scm.zsh b/lib/scm.zsh index 966de0ed8..f30e86e72 100644 --- a/lib/scm.zsh +++ b/lib/scm.zsh @@ -11,15 +11,16 @@ function _scm_debug { [ $SCM_DEBUG ] && echo $* >&2 } # Checks given 1st path argument if it's root of .git|.hg|.svn function _scm_get_scm_type { + [[ "$1" = "/" ]] && return 1 + for type ($_scm_types) { [ ! -d "$1/.$type" ] && continue export SCM_ROOT="$1" export SCM_TYPE=$type - return 0 } - + return 1 }