From dcf32d2b3d0bb1abe2e46041adb48b13ba328332 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 27 Oct 2018 18:22:04 -0400 Subject: [PATCH] Clearer errors --- autoload/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 4ba3593..4666f7b 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -376,7 +376,7 @@ function! fugitive#repo(...) abort endif return extend(repo, s:repo_prototype, 'keep') endif - call s:throw('not a git repository: '.expand('%:p')) + call s:throw('not a Git repository: ' . string(dir)) endfunction function! s:repo_dir(...) dict abort @@ -1098,7 +1098,7 @@ function! fugitive#buffer(...) abort if buffer.getvar('git_dir') !=# '' return buffer endif - call s:throw('not a git repository: '.bufname(buffer['#'])) + call s:throw('not a Fugitive buffer: ' . string(bufname(buffer['#']))) endfunction function! s:buffer_getvar(var) dict abort