Work around .git in 'wildignore'

Closes #119.
This commit is contained in:
Tim Pope
2011-12-06 15:57:45 -05:00
parent 03e138c349
commit 701304c164

View File

@@ -818,13 +818,13 @@ function! s:Commit(args) abort
let args = '--cleanup=strip '.args
endif
if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod
keepalt edit `=msgfile`
execute 'keepalt edit '.s:fnameescape(msgfile)
elseif s:buffer().type() ==# 'index'
keepalt edit `=msgfile`
execute 'keepalt edit '.s:fnameescape(msgfile)
execute (search('^#','n')+1).'wincmd+'
setlocal nopreviewwindow
else
keepalt split `=msgfile`
execute 'keepalt split '.s:fnameescape(msgfile)
endif
let b:fugitive_commit_arguments = args
setlocal bufhidden=delete filetype=gitcommit