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 9ba2680ad58a55a45da2e41d6b1ebe65026b04c8 (tree)
parent 98bd8428b57a3dc794c158a0822be4f7b94ce7da
Author: Tim Pope <code@tpope.net>
Date:   Tue, 17 Aug 2021 22:28:01 -0400

Add special case error for failure to find Git in PATH

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

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -91,6 +91,10 @@ function! s:VersionCheck() abort if v:version < 704 return 'return ' . string('echoerr "fugitive: Vim 7.4 or newer required"') elseif empty(fugitive#GitVersion()) + let exe = get(s:GitCmd(), 0, '') + if exists('*exepath') && len(exe) && empty(exepath(exe)) + return 'return ' . string('echoerr "fugitive: cannot find ' . string(exe) . ' in PATH"') + endif return 'return ' . string('echoerr "fugitive: cannot execute Git"') elseif !fugitive#GitVersion(1, 8, 5) return 'return ' . string('echoerr "fugitive: Git 1.8.5 or newer required"')