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 endif
return extend(repo, s:repo_prototype, 'keep') return extend(repo, s:repo_prototype, 'keep')
endif endif
call s:throw('not a git repository: '.expand('%:p')) call s:throw('not a Git repository: ' . string(dir))
endfunction endfunction
function! s:repo_dir(...) dict abort function! s:repo_dir(...) dict abort
@@ -1098,7 +1098,7 @@ function! fugitive#buffer(...) abort
if buffer.getvar('git_dir') !=# '' if buffer.getvar('git_dir') !=# ''
return buffer return buffer
endif endif
call s:throw('not a git repository: '.bufname(buffer['#'])) call s:throw('not a Fugitive buffer: ' . string(bufname(buffer['#'])))
endfunction endfunction
function! s:buffer_getvar(var) dict abort function! s:buffer_getvar(var) dict abort