From 24e9b492fed51b1390b0f7984a047cdef776db7d Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 25 Mar 2012 22:19:19 -0400 Subject: [PATCH] Fix git-dir detection on Windows Closes #176. --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index f9fb73f579..157092452f 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 = ""