|
|
|
@ -201,17 +201,18 @@ endf |
|
|
|
|
|
|
|
func! s:sync(bang, bundle) abort |
|
|
|
let git_dir = expand(a:bundle.path().'/.git/', 1) |
|
|
|
let bundle_path = shellescape(a:bundle.path()) |
|
|
|
if isdirectory(git_dir) || filereadable(expand(a:bundle.path().'/.git', 1)) |
|
|
|
if !(a:bang) | return 'todate' | endif |
|
|
|
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull && git submodule update --init --recursive' |
|
|
|
let cmd = g:shellesc_cd('cd '.bundle_path) |
|
|
|
let cmd .= ' && git pull' |
|
|
|
let cmd .= ' && git submodule update --init --recursive' |
|
|
|
|
|
|
|
let cmd = g:shellesc_cd(cmd) |
|
|
|
|
|
|
|
let get_current_sha = 'cd '.shellescape(a:bundle.path()).' && git rev-parse HEAD' |
|
|
|
let get_current_sha = g:shellesc_cd(get_current_sha) |
|
|
|
let get_current_sha = g:shellesc_cd('cd '.bundle_path) |
|
|
|
let get_current_sha .= ' && git rev-parse HEAD' |
|
|
|
let initial_sha = system(get_current_sha)[0:15] |
|
|
|
else |
|
|
|
let cmd = 'git clone --recursive '.shellescape(a:bundle.uri).' '.shellescape(a:bundle.path()) |
|
|
|
let cmd = 'git clone --recursive '.shellescape(a:bundle.uri).' '.bundle_path |
|
|
|
let initial_sha = '' |
|
|
|
endif |
|
|
|
|
|
|
|
|