From 39012290b8700b2ab17ca09360c91a4202b81f30 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 3 Apr 2012 06:52:48 -0400 Subject: [PATCH] Fix incorrect usage of readfile() --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 9a6a9d3..bad2b0c 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -118,7 +118,7 @@ function! fugitive#extract_git_dir(path) abort elseif type ==# 'link' && fugitive#is_git_dir(dir) return resolve(dir) elseif type !=# '' && filereadable(dir) - let line = get(readfile(dir, 1), 0, '') + let line = get(readfile(dir, '', 1), 0, '') if line =~# '^gitdir: ' && fugitive#is_git_dir(line[8:-1]) return line[8:-1] endif @@ -199,7 +199,7 @@ function! s:repo_configured_tree() dict abort if !has_key(self,'_tree') let self._tree = '' if filereadable(self.dir('config')) - let config = readfile(self.dir('config'),10) + let config = readfile(self.dir('config'),'',10) call filter(config,'v:val =~# "^\\s*worktree *="') if len(config) == 1 let self._tree = matchstr(config[0], '= *\zs.*')