diff options
Diffstat (limited to 'ftplugin/git.vim')
-rw-r--r-- | ftplugin/git.vim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ftplugin/git.vim b/ftplugin/git.vim index 444d7562..38b9493b 100644 --- a/ftplugin/git.vim +++ b/ftplugin/git.vim @@ -14,6 +14,8 @@ let b:did_ftplugin = 1 if !exists('b:git_dir') if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' " Stay out of the way + elseif expand('%:p') =~# '[\/]\.git[\/]worktrees' + let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>') elseif expand('%:p') =~# '\.git\>' let b:git_dir = matchstr(expand('%:p'),'.*\.git\>') elseif $GIT_DIR != '' |