mirror of
https://github.com/junegunn/vim-plug.git
synced 2025-12-07 01:24:27 +08:00
12
plug.vim
12
plug.vim
@@ -1873,9 +1873,15 @@ function! s:progress_bar(line, bar, total)
|
||||
endfunction
|
||||
|
||||
function! s:compare_git_uri(a, b)
|
||||
let a = substitute(a:a, 'git:\{1,2}@', '', '')
|
||||
let b = substitute(a:b, 'git:\{1,2}@', '', '')
|
||||
return a ==# b
|
||||
" See `git help clone'
|
||||
" https:// [user@] github.com[:port] / junegunn/vim-plug [.git]
|
||||
" [git@] github.com[:port] : junegunn/vim-plug [.git]
|
||||
" file:// / junegunn/vim-plug [/]
|
||||
" / junegunn/vim-plug [/]
|
||||
let pat = '^\%(\w\+://\)\='.'\%([^@/]*@\)\='.'\([^:/]*\%(:[0-9]*\)\=\)'.'[:/]'.'\(.\{-}\)'.'\%(\.git\)\=/\?$'
|
||||
let ma = matchlist(a:a, pat)
|
||||
let mb = matchlist(a:b, pat)
|
||||
return ma[1:2] ==# mb[1:2]
|
||||
endfunction
|
||||
|
||||
function! s:format_message(bullet, name, message)
|
||||
|
||||
Reference in New Issue
Block a user