motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 008b9570860f552534109b4f618cf2ddd145eeb4 (tree)
parent 16c2b7abb97111a4c241fbe37ac40e21585773a9
Author: Tim Pope <code@tpope.net>
Date:   Wed, 24 Feb 2016 19:29:27 -0500

Ignore worktree with broken gitdir

References https://github.com/tpope/vim-fugitive/issues/751

Diffstat:
Mplugin/fugitive.vim | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -271,6 +271,9 @@ function! s:configured_tree(git_dir) abort endif elseif filereadable(a:git_dir . '/gitdir') let worktree = fnamemodify(readfile(a:git_dir . '/gitdir')[0], ':h') + if worktree ==# '.' + unlet! worktree + endif endif if exists('worktree') let s:worktree_for_dir[a:git_dir] = worktree