Browse Source

Remove redundant checks of git --version in Neovim installer

Related: #445
Junegunn Choi 9 years ago
parent
commit
820cc63569
1 changed files with 3 additions and 2 deletions
  1. 3 2
      plug.vim

+ 3 - 2
plug.vim

@@ -288,8 +288,9 @@ function! s:version_requirement(val, min)
 endfunction
 
 function! s:git_version_requirement(...)
-  let s:git_version = get(s:, 'git_version',
-    \ map(split(split(s:system('git --version'))[-1], '\.'), 'str2nr(v:val)'))
+  if !exists('s:git_version')
+    let s:git_version = map(split(split(s:system('git --version'))[-1], '\.'), 'str2nr(v:val)')
+  endif
   return s:version_requirement(s:git_version, a:000)
 endfunction