Fix readfile

This commit is contained in:
Tim Pope
2018-07-16 20:29:27 -04:00
parent 5a7469d899
commit 65346f0926

View File

@@ -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