Cleaner error on -z command failure

This commit is contained in:
Tim Pope 2019-08-13 14:10:53 -04:00
parent 79b1f16a7a
commit d1033e756e

View File

@ -459,7 +459,7 @@ endfunction
function! s:NullError(...) abort function! s:NullError(...) abort
let [out, exec_error] = s:SystemError(call('fugitive#Prepare', a:000)) let [out, exec_error] = s:SystemError(call('fugitive#Prepare', a:000))
return [exec_error ? [] : split(out, "\1"), exec_error ? out : '', exec_error] return [exec_error ? [] : split(out, "\1"), exec_error ? substitute(out, "\n$", "", "") : '', exec_error]
endfunction endfunction
function! s:TreeChomp(...) abort function! s:TreeChomp(...) abort