mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-12-08 21:14:53 +08:00
Fix readfile() usage
Resolves: https://github.com/tpope/vim-fugitive/issues/1886
This commit is contained in:
@@ -474,7 +474,7 @@ function! fugitive#CommonDir(dir) abort
|
|||||||
if getfsize(a:dir . '/HEAD') < 10
|
if getfsize(a:dir . '/HEAD') < 10
|
||||||
let s:commondirs[a:dir] = ''
|
let s:commondirs[a:dir] = ''
|
||||||
elseif filereadable(a:dir . '/commondir')
|
elseif filereadable(a:dir . '/commondir')
|
||||||
let cdir = get(readfile(a:dir . '/commondir', 1), 0, '')
|
let cdir = get(readfile(a:dir . '/commondir', '', 1), 0, '')
|
||||||
if cdir =~# '^/\|^\a:/'
|
if cdir =~# '^/\|^\a:/'
|
||||||
let s:commondirs[a:dir] = s:Slash(FugitiveVimPath(cdir))
|
let s:commondirs[a:dir] = s:Slash(FugitiveVimPath(cdir))
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user