dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README

commit 9ed3230d7f7b88176f4e7fac10782ead2d7c5c93 (patch)
parent cf64c29b028da7850f04949713962bb1add16c90
Author: Alex Karle <alex@karle.co>
Date:   Tue, 30 Apr 2019 22:58:07 -0400

vim: git-worktree support for :GitGrep

In particular, this Vim function was walking back looking for the .git
folder, but in a worktree, this is a file instead.

Diffstat:
Mvim/autoload/vimrc.vim | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vim/autoload/vimrc.vim b/vim/autoload/vimrc.vim @@ -52,7 +52,8 @@ function! s:InGitRepo() abort let running_path = '' for dir in dir_list let running_path = join([running_path, dir], fsep) - if isdirectory(running_path . fsep . '.git') + let f = running_path . fsep . '.git' + if filereadable(f) || isdirectory(f) return 1 endif endfor