mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 14:23:51 -05:00
Fix readfile
This commit is contained in:
@@ -572,9 +572,9 @@ function! fugitive#readfile(url, ...) abort
|
|||||||
if entry[2] !=# 'blob'
|
if entry[2] !=# 'blob'
|
||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
let [dir, commit, file] = s:DirCommitFile(a:url)
|
let [dir, rev] = s:DirRev(a:url)
|
||||||
let cmd = g:fugitive_git_executable . ' --git-dir=' . s:shellesc(dir) .
|
let cmd = g:fugitive_git_executable . ' --git-dir=' . s:shellesc(dir) .
|
||||||
\ ' cat-file blob ' . s:shellesc(commit . ':' . file[1:-1])
|
\ ' cat-file blob ' . s:shellesc(rev)
|
||||||
if max > 0 && s:executable('head')
|
if max > 0 && s:executable('head')
|
||||||
let cmd .= '|head -' . max
|
let cmd .= '|head -' . max
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user