Be flexible with path delimiter in detection
This commit is contained in:
parent
2ed42806b6
commit
a792da75c4
@ -88,9 +88,9 @@ function! s:ExtractGitDir(path) abort
|
||||
let nfn = fn
|
||||
while fn != ofn
|
||||
if isdirectory(fn . '/.git')
|
||||
return s:sub(simplify(fnamemodify(fn . '/.git',':p')),'/$','')
|
||||
return s:sub(simplify(fnamemodify(fn . '/.git',':p')),'\W$','')
|
||||
elseif fn =~ '\.git$' && filereadable(fn . '/HEAD')
|
||||
return s:sub(simplify(fnamemodify(fn,':p')),'/$','')
|
||||
return s:sub(simplify(fnamemodify(fn,':p')),'\W$','')
|
||||
endif
|
||||
let ofn = fn
|
||||
let fn = fnamemodify(ofn,':h')
|
||||
|
Loading…
Reference in New Issue
Block a user