From f9c0b8eafea641ba27fd261b2b244944f87e6fd4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 15 Nov 2021 20:54:19 -0500 Subject: [PATCH] Fix readfile() usage Resolves: https://github.com/tpope/vim-fugitive/issues/1886 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 94a86d5..e604c8a 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -474,7 +474,7 @@ function! fugitive#CommonDir(dir) abort if getfsize(a:dir . '/HEAD') < 10 let s:commondirs[a:dir] = '' 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:/' let s:commondirs[a:dir] = s:Slash(FugitiveVimPath(cdir)) else