Don't dispatch autocommands when calling git commit

Closes #295.
This commit is contained in:
Tim Pope 2013-03-12 02:32:13 -04:00
parent 09cbdded83
commit f6d93b8788

View File

@ -931,11 +931,11 @@ 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'
silent execute '!('.command.' > '.outfile.') >& '.errorfile noautocmd silent execute '!('.command.' > '.outfile.') >& '.errorfile
elseif a:args =~# '\%(^\| \)--interactive\>' elseif a:args =~# '\%(^\| \)--interactive\>'
execute '!'.command.' 2> '.errorfile noautocmd execute '!'.command.' 2> '.errorfile
else else
silent execute '!'.command.' > '.outfile.' 2> '.errorfile noautocmd silent execute '!'.command.' > '.outfile.' 2> '.errorfile
endif endif
finally finally
execute cd.'`=dir`' execute cd.'`=dir`'