Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uri_https2ssl() for self manage repo check #747

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion autoload/vundle/installer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ func! s:get_current_sha(bundle)
return out
endf

func! s:uri_https2ssl(uri)
return substitute(a:uri, '\<https:\/\/\(\w\+\.\w\+\)\/\(\w\+\)\/\([a-zA-Z\.]\+\)', 'git@\1:\2/\3', 'g')
endf

" ---------------------------------------------------------------------------
" Create the appropriate sync command to run according to the current state of
Expand All @@ -382,7 +385,7 @@ func! s:make_sync_command(bang, bundle) abort
if isdirectory(git_dir) || filereadable(expand(a:bundle.path().'/.git', 1))

let current_origin_url = s:get_current_origin_url(a:bundle)
if current_origin_url != a:bundle.uri
if current_origin_url != a:bundle.uri && current_origin_url != s:uri_https2ssl(a:bundle.uri)
call s:log('Plugin URI change detected for Plugin ' . a:bundle.name)
call s:log('> Plugin ' . a:bundle.name . ' old URI: ' . current_origin_url)
call s:log('> Plugin ' . a:bundle.name . ' new URI: ' . a:bundle.uri)
Expand Down