From b8046d1c5ed4cfe60eec0412943d1ad9a970e04c Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 21 Jul 2018 15:36:01 -0400 Subject: [PATCH] Reduce noise on E211 from :Git --- autoload/fugitive.vim | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 0802adf..3436f39 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -739,9 +739,9 @@ endfunction function! s:cpath(path) abort if exists('+fileignorecase') && &fileignorecase - return tolower(a:path) + return s:PlatformSlash(tolower(a:path)) else - return a:path + return s:PlatformSlash(a:path) endif endfunction @@ -832,17 +832,6 @@ call s:add_methods('buffer',['getvar','getline','repo','type','spec','name','com call s:command("-bang -nargs=? -complete=customlist,s:GitComplete Git :execute s:Git(0,'',)") -function! s:ExecuteInTree(cmd) abort - let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd' - let dir = getcwd() - try - execute cd s:fnameescape(s:repo().tree()) - execute a:cmd - finally - execute cd s:fnameescape(dir) - endtry -endfunction - function! s:Git(bang, mods, args) abort if a:bang return s:Edit('edit', 1, a:mods, a:args) @@ -852,22 +841,27 @@ function! s:Git(bang, mods, args) abort let git .= ' --no-pager' endif let args = matchstr(a:args,'\v\C.{-}%($|\\@