Clearer errors

This commit is contained in:
Tim Pope
2018-10-27 18:22:04 -04:00
parent 0fd64f8fbf
commit dcf32d2b3d

View File

@@ -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