Fix :Gcommit %

This commit is contained in:
Tim Pope
2011-05-09 20:05:50 -04:00
parent b089a2b7ce
commit c872a54675

View File

@@ -728,13 +728,14 @@ function! s:Commit(args) abort
endif endif
let command .= s:repo().git_command('commit').' '.a:args let command .= s:repo().git_command('commit').' '.a:args
if &shell =~# 'csh' if &shell =~# 'csh'
call system('(('.command.' > '.outfile.') >& '.errorfile.')') silent execute '!('.command.' > '.outfile.') >& '.errorfile
elseif a:args =~# '\%(^\| \)--interactive\>' elseif a:args =~# '\%(^\| \)--interactive\>'
execute '!'.command.' 2> '.errorfile execute '!'.command.' 2> '.errorfile
elseif shell =~# 'cmd'
silent execute '!'.command.' > '.outfile.' 2> '.errorfile
else else
call system(command.' > '.outfile.' 2> '.errorfile) silent execute '!'.command.' > '.outfile.' 2> '.errorfile
endif
if !has('gui_running')
redraw!
endif endif
if !v:shell_error if !v:shell_error
if filereadable(outfile) if filereadable(outfile)