From 2c999d4a69912ca31d7e0eeeae6e56bd08b80c49 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 17 Jan 2024 18:24:43 -0500 Subject: [PATCH] Fix write to index on Vim 7 Resolves: https://github.com/tpope/vim-fugitive/issues/2254 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 19d2d08..b4e8440 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1007,7 +1007,7 @@ function! s:StdoutToFile(out, cmd, ...) abort throw 'fugitive: Vim 8 or higher required to use ' . &shell else let cmd = fugitive#ShellCommand(a:cmd) - return s:SystemError(' (' . cmd . ' >' . a:out . ') ') + return s:SystemError(' (' . cmd . ' >' . (len(a:out) ? a:out : '/dev/null') . ') ') endif endfunction