Skip to content

Commit

Permalink
fix commit logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Oct 6, 2012
1 parent 50c11c3 commit 2bb162e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions autoload/vcs/git/commit.vim
Expand Up @@ -12,7 +12,7 @@ function! vcs#git#commit#do(args)
endif

let s:files = type(a:args) == type([]) ? a:args : [a:args]
call vcs#system(['git', 'commit', '--include', join(vcs#escape(s:files), ' ')], 1)
call vcs#system(['git', 'commit', join(vcs#escape(s:files), ' ')], 1)
call vcs#execute(['tabedit', '.git/COMMIT_EDITMSG'])
call vcs#execute(['set', 'filetype=gitcommit'])

Expand All @@ -35,7 +35,6 @@ function! s:commit()
let lines = vcs#system([
\ 'git',
\ 'commit',
\ '--include',
\ '-F',
\ '.git/COMMIT_EDITMSG',
\ join(vcs#escape(s:files), ' ')
Expand Down
3 changes: 1 addition & 2 deletions autoload/vcs/svn/commit.vim
Expand Up @@ -17,8 +17,7 @@ function! vcs#svn#commit#do(args)

augroup VimUniteVcsSvnCommit
autocmd!
autocmd! BufWinEnter <buffer> setlocal bufhidden=delete nobuflisted noswapfile
autocmd! BufWritePre <buffer> g/^#\|^\s*$/d
autocmd! BufWinEnter <buffer> setlocal bufhidden=wipe nobuflisted noswapfile
autocmd! BufWinLeave <buffer> call s:commit()
augroup END
endfunction
Expand Down

0 comments on commit 2bb162e

Please sign in to comment.