From 8f0b8edfbd246c0026b7a2388e1d883d579ac7f6 Mon Sep 17 00:00:00 2001 From: "Jason A. Ribeiro" Date: Tue, 21 Jan 2014 18:39:48 -0500 Subject: [PATCH] Respect GIT_CEILING_DIRECTORIES --- plugin/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index dbbc754..8ddb28d 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -136,6 +136,9 @@ function! fugitive#extract_git_dir(path) abort " checking for them since such checks are extremely slow. break endif + if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 + break + endif let dir = s:sub(root, '[\/]$', '') . '/.git' let type = getftype(dir) if type ==# 'dir' && fugitive#is_git_dir(dir)