From e64870df9c91d976e3d6358df9b39d6834c4ce8e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 24 Oct 2010 13:40:07 -0400 Subject: [PATCH] Fix error after empty commit message --- plugin/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index c2a7bd4..43827c0 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -697,7 +697,8 @@ function! s:Commit(args) abort endif return '' else - let error = get(readfile(errorfile),-2,'!') + let errors = readfile(errorfile) + let error = get(errors,-2,get(errors,-1,'!')) if error =~# "'false'\\.$" let args = a:args let args = s:gsub(args,'%(%(^| )-- )@