From 60a46cd58eec19603afbf3c42470c579386d74ad Mon Sep 17 00:00:00 2001 From: gmarik Date: Tue, 3 May 2011 01:00:03 -0500 Subject: [PATCH] do not sync when `sync` is set to `no` --- autoload/vundle/config.vim | 6 +++++- autoload/vundle/installer.vim | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index cecc283..9977549 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -81,8 +81,12 @@ endf let s:bundle = {} +func! s:bundle.nosync() + return has_key(self, 'sync') && 'no' == self.sync() +endf + func! s:bundle.path() - if has_key(self, 'sync') && 'no' == self.sync + if self.nosync() if isdirectory(expand(self.uri)) let path = expand(self.uri) endif diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index f54a87a..e909fe3 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -62,6 +62,7 @@ func! s:helptags(rtp) abort endf func! s:sync(bang, bundle) abort + if a:bundle.nosync() | return 0 | endif let git_dir = expand(a:bundle.path().'/.git') if isdirectory(git_dir) if !(a:bang) | return 0 | endif