From 7ebe5c143dcda62e5a66891322b7cd66470841c4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 7 May 2017 15:29:01 -0400 Subject: [PATCH] Handle .git in file system root References https://github.com/tpope/vim-fugitive/issues/908 --- plugin/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 8eb90c6..8289368 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -298,6 +298,9 @@ endfunction function! s:repo_tree(...) dict abort if self.dir() =~# '/\.git$' let dir = self.dir()[0:-6] + if dir !~# '/' + let dir .= '/' + endif else let dir = s:configured_tree(self.git_dir) endif