Fix git-dir detection on Windows

Closes #176.
This commit is contained in:
Tim Pope
2012-03-25 22:19:19 -04:00
parent bc3ffa6b44
commit 24e9b492fe

View File

@@ -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 = ""