Fix :Gcommit with noisy pre-commit hook

This commit is contained in:
Tim Pope 2010-09-09 11:17:45 -04:00
parent 9d02bf0868
commit 24efca8f4f

View File

@ -697,7 +697,7 @@ function! s:Commit(args) abort
endif
return ''
else
let error = get(readfile(errorfile,'',1),0,'!')
let error = get(readfile(errorfile),-2,'!')
if error =~# "'false'\\.$"
let args = a:args
let args = s:gsub(args,'%(%(^| )-- )@<!%(^| )@<=%(-[se]|--edit|--interactive)%($| )','')