Fix error message on blank buffer with no Git dir

This commit is contained in:
Tim Pope
2019-10-11 17:21:16 -04:00
parent 427ac52d7d
commit 06e34204af

View File

@@ -76,7 +76,7 @@ function! s:DirCheck(...) abort
if !empty(a:0 ? s:Dir(a:1) : s:Dir()) if !empty(a:0 ? s:Dir(a:1) : s:Dir())
return '' return ''
elseif empty(bufname('')) elseif empty(bufname(''))
return 'return ' . string('echoerr "fugitive: blank buffer unsupported (edit a file from a repository)"') return 'return ' . string('echoerr "fugitive: working directory does not belong to a Git repository"')
else else
return 'return ' . string('echoerr "fugitive: file does not belong to a Git repository"') return 'return ' . string('echoerr "fugitive: file does not belong to a Git repository"')
endif endif