From 1260de3b7d3b9cbc6c27d834b1f7b31ce266bc63 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 8 Aug 2019 18:15:26 -0400 Subject: [PATCH] Fix :Gread blobhash References https://github.com/tpope/vim-fugitive/issues/836 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)