Преглед изворни кода

Do not proceed if $GIT_DIR or $GIT_WORK_TREE is found

Close #506
Junegunn Choi пре 9 година
родитељ
комит
5695fb8474
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      plug.vim

+ 6 - 0
plug.vim

@@ -705,6 +705,12 @@ function! s:prepare(...)
     throw 'Invalid current working directory. Cannot proceed.'
   endif
 
+  for evar in ['$GIT_DIR', '$GIT_WORK_TREE']
+    if exists(evar)
+      throw evar.' detected. Cannot proceed.'
+    endif
+  endfor
+
   call s:job_abort()
   if s:switch_in()
     normal q