Fix :Gread blobhash
References https://github.com/tpope/vim-fugitive/issues/836
This commit is contained in:
parent
9d36dc2d74
commit
1260de3b7d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user