1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 23:49:19 +08:00

Fix dein support (#3393)

This commit is contained in:
Wang Shidong 2020-03-04 00:07:38 +08:00 committed by GitHub
parent 1eb326c134
commit 43c364ee6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -450,10 +450,19 @@ function! s:pull(repo) abort
endif
endfunction
function! s:get_uri(repo) abort
if a:repo.repo =~# '^[^/]\+/[^/]\+$'
let url = 'https://github.com/' . (has_key(a:repo, 'repo') ? a:repo.repo : a:repo.orig_path)
return url
else
return a:repo.repo
endif
endfunction
function! s:install(repo) abort
let s:pct += 1
let s:ui_buf[a:repo.name] = s:pct
let url = 'https://github.com/' . (has_key(a:repo, 'repo') ? a:repo.repo : a:repo.orig_path)
let url = s:get_uri(a:repo)
if get(a:repo, 'rev', '') !=# ''
let argv = ['git', 'clone', '--recursive', '--progress', url, a:repo.path]
else