diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index f9fb73f..1570924 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -105,8 +105,8 @@ function! fugitive#is_git_dir(path) abort endfunction function! fugitive#extract_git_dir(path) abort - if s:shellslash(a:path) =~? '^fugitive://.*//' - return matchstr(a:path,'fugitive://\zs.\{-\}\ze//') + if s:shellslash(a:path) =~# '^fugitive://.*//' + return matchstr(s:shellslash(a:path), '\C^fugitive://\zs.\{-\}\ze//') endif let root = s:shellslash(simplify(fnamemodify(a:path,':p:s?[\/]$??'))) let previous = ""