diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c5043e0..f096770 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1886,7 +1886,7 @@ function! fugitive#FileReadCmd(...) abort if empty(dir) return 'noautocmd ' . line . 'read ' . s:fnameescape(amatch) endif - if rev !~# ':' + if rev !~# ':' && s:ChompDefault('', [dir, 'cat-file', '-t', rev]) =~# '^\%(commit\|tag\)$' let cmd = fugitive#Prepare(dir, 'log', '--pretty=format:%B', '-1', rev, '--') else let cmd = fugitive#Prepare(dir, 'cat-file', '-p', rev)