343343" return -- the URL for the origin remote (string)
344344" ---------------------------------------------------------------------------
345345func ! s: get_current_origin_url (bundle) abort
346- let cmd = ' cd ' .vundle#installer#shellesc (a: bundle .path ()).' && git config --get remote.origin.url'
346+ let cmd = ' cd ' .vundle#installer#shellesc (a: bundle .path ()).' && ' .
347+ g: vundle #git_executable.' config --get remote.origin.url'
347348 let cmd = vundle#installer#shellesc_cd (cmd)
348349 let out = s: strip (s: system (cmd))
349350 return out
357358" return -- A 15 character log sha for the current HEAD
358359" ---------------------------------------------------------------------------
359360func ! s: get_current_sha (bundle)
360- let cmd = ' cd ' .vundle#installer#shellesc (a: bundle .path ()).' && git rev-parse HEAD'
361+ let cmd = ' cd ' .vundle#installer#shellesc (a: bundle .path ()).' && ' .
362+ g: vundle #git_executable.' rev-parse HEAD'
361363 let cmd = vundle#installer#shellesc_cd (cmd)
362364 let out = s: system (cmd)[0 :15 ]
363365 return out
@@ -389,10 +391,10 @@ func! s:make_sync_command(bang, bundle) abort
389391 " Directory names match but the origin remotes are not the same
390392 let cmd_parts = [
391393 \ ' cd ' .vundle#installer#shellesc (a: bundle .path ()) ,
392- \ ' git remote set-url origin ' . vundle#installer#shellesc (a: bundle .uri),
393- \ ' git fetch' ,
394- \ ' git reset --hard origin/HEAD' ,
395- \ ' git submodule update --init --recursive' ,
394+ \ g: vundle #git_executable. ' remote set-url origin ' . vundle#installer#shellesc (a: bundle .uri),
395+ \ g: vundle #git_executable. ' fetch' ,
396+ \ g: vundle #git_executable. ' reset --hard origin/HEAD' ,
397+ \ g: vundle #git_executable. ' submodule update --init --recursive' ,
396398 \ ]
397399 let cmd = join (cmd_parts, ' && ' )
398400 let cmd = vundle#installer#shellesc_cd (cmd)
@@ -407,15 +409,15 @@ func! s:make_sync_command(bang, bundle) abort
407409
408410 let cmd_parts = [
409411 \ ' cd ' .vundle#installer#shellesc (a: bundle .path ()),
410- \ ' git pull' ,
411- \ ' git submodule update --init --recursive' ,
412+ \ g: vundle #git_executable. ' pull' ,
413+ \ g: vundle #git_executable. ' submodule update --init --recursive' ,
412414 \ ]
413415 let cmd = join (cmd_parts, ' && ' )
414416 let cmd = vundle#installer#shellesc_cd (cmd)
415417
416418 let initial_sha = s: get_current_sha (a: bundle )
417419 else
418- let cmd = ' git clone --recursive ' .vundle#installer#shellesc (a: bundle .uri).' ' .vundle#installer#shellesc (a: bundle .path ())
420+ let cmd = g: vundle #git_executable. ' clone --recursive ' .vundle#installer#shellesc (a: bundle .uri).' ' .vundle#installer#shellesc (a: bundle .path ())
419421 let initial_sha = ' '
420422 endif
421423 return [cmd, initial_sha]
0 commit comments