Fail silently retrieving work tree for blank git dir
Closes https://github.com/tpope/vim-fugitive/issues/1113
This commit is contained in:
parent
7fae98f263
commit
2845e6dc4f
@ -104,6 +104,8 @@ function! FugitiveTreeForGitDir(path) abort
|
|||||||
let dir = a:path
|
let dir = a:path
|
||||||
if dir =~# '/\.git$'
|
if dir =~# '/\.git$'
|
||||||
return len(dir) ==# 5 ? '/' : dir[0:-6]
|
return len(dir) ==# 5 ? '/' : dir[0:-6]
|
||||||
|
elseif dir ==# ''
|
||||||
|
return ''
|
||||||
endif
|
endif
|
||||||
if !has_key(s:worktree_for_dir, dir)
|
if !has_key(s:worktree_for_dir, dir)
|
||||||
let s:worktree_for_dir[dir] = ''
|
let s:worktree_for_dir[dir] = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user