commit fb5531997342be62efbbb98bda4b90ee88b2ac00 (tree)
parent 02fe20ece46912dd964a185bf6896fc8759564d2
Author: Tim Pope <code@tpope.net>
Date: Sat, 15 Sep 2018 16:47:20 -0400
Show error getting type for object in BufReadCmd
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -1440,13 +1440,14 @@ function! fugitive#BufReadCmd(...) abort
let b:fugitive_type = 'tree'
endif
if v:shell_error
+ let error = b:fugitive_type
unlet b:fugitive_type
if rev =~# '^:\d:'
let &readonly = !filewritable(dir . '/index')
return 'silent doautocmd BufNewFile '.s:fnameescape(amatch)
else
setlocal readonly nomodifiable
- return ''
+ return 'echo ' . string(error)
endif
elseif b:fugitive_type !~# '^\%(tag\|commit\|tree\|blob\)$'
return "echoerr ".string("fugitive: unrecognized git type '".b:fugitive_type."'")