mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
* fixed _scm_get_scm_type for long waiting when checking / (root) for scm type
This commit is contained in:
parent
3668f36fbd
commit
8e2e64f0b9
1 changed files with 3 additions and 2 deletions
|
|
@ -11,12 +11,13 @@ function _scm_debug { [ $SCM_DEBUG ] && echo $* >&2 }
|
||||||
|
|
||||||
# Checks given 1st path argument if it's root of .git|.hg|.svn
|
# Checks given 1st path argument if it's root of .git|.hg|.svn
|
||||||
function _scm_get_scm_type {
|
function _scm_get_scm_type {
|
||||||
|
[[ "$1" = "/" ]] && return 1
|
||||||
|
|
||||||
for type ($_scm_types) {
|
for type ($_scm_types) {
|
||||||
[ ! -d "$1/.$type" ] && continue
|
[ ! -d "$1/.$type" ] && continue
|
||||||
|
|
||||||
export SCM_ROOT="$1"
|
export SCM_ROOT="$1"
|
||||||
export SCM_TYPE=$type
|
export SCM_TYPE=$type
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue