Support :Gcommit --patch

Closes #452.
This commit is contained in:
Tim Pope
2014-03-20 13:21:19 -04:00
parent 70ec927890
commit d6f17608dd

View File

@@ -959,7 +959,7 @@ function! s:Commit(args) abort
let command .= s:repo().git_command('commit').' '.a:args let command .= s:repo().git_command('commit').' '.a:args
if &shell =~# 'csh' if &shell =~# 'csh'
noautocmd silent execute '!('.command.' > '.outfile.') >& '.errorfile noautocmd silent execute '!('.command.' > '.outfile.') >& '.errorfile
elseif a:args =~# '\%(^\| \)--interactive\>' elseif a:args =~# '\%(^\| \)-\%(-interactive\|p\|-patch\)\>'
noautocmd execute '!'.command.' 2> '.errorfile noautocmd execute '!'.command.' 2> '.errorfile
else else
noautocmd silent execute '!'.command.' > '.outfile.' 2> '.errorfile noautocmd silent execute '!'.command.' > '.outfile.' 2> '.errorfile