Ignore git:@
when validating cloned repository
This commit is contained in:
parent
77b1bdfa8a
commit
e95dd2e468
9
plug.vim
9
plug.vim
|
@ -484,6 +484,12 @@ function! s:progress_bar(line, bar, total)
|
||||||
call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']')
|
call setline(a:line, '[' . s:lpad(a:bar, a:total) . ']')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:compare_git_uri(a, b)
|
||||||
|
let a = substitute(a:a, 'git:@', '', '')
|
||||||
|
let b = substitute(a:b, 'git:@', '', '')
|
||||||
|
return a ==# b
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:git_valid(spec, cd)
|
function! s:git_valid(spec, cd)
|
||||||
let ret = 1
|
let ret = 1
|
||||||
let msg = 'OK'
|
let msg = 'OK'
|
||||||
|
@ -491,7 +497,7 @@ function! s:git_valid(spec, cd)
|
||||||
if a:cd | execute "cd " . a:spec.dir | endif
|
if a:cd | execute "cd " . a:spec.dir | endif
|
||||||
let remote = s:system("git config remote.origin.url")
|
let remote = s:system("git config remote.origin.url")
|
||||||
|
|
||||||
if remote != a:spec.uri
|
if !s:compare_git_uri(remote, a:spec.uri)
|
||||||
let msg = 'Invalid remote: ' . remote . '. Try PlugClean.'
|
let msg = 'Invalid remote: ' . remote . '. Try PlugClean.'
|
||||||
let ret = 0
|
let ret = 0
|
||||||
else
|
else
|
||||||
|
@ -631,6 +637,7 @@ function! s:status()
|
||||||
redraw
|
redraw
|
||||||
endfor
|
endfor
|
||||||
call setline(1, 'Finished. '.ecnt.' error(s).')
|
call setline(1, 'Finished. '.ecnt.' error(s).')
|
||||||
|
normal! gg
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
|
|
Loading…
Reference in New Issue
Block a user