When commit-message includes modeline specifier (vim:), Gita-commit-amend gets an error.
Behavior (required)
Vim tries to treat commit-message vim: as modeline, therefore it causes E518 error.
Minimal vimrc (required)
if has('vim_starting')
set runtimepath+=/path/to/vim-gita
endif
Procedure (required)
terminal:
$ cat vimrc
if has('vim_starting')
set runtimepath+=/path/to/vim-gita
endif
$ git init testrepo
$ cd testrepo
$ echo hello >file
$ git add file
$ git commit -m'vim: commit'
$ vim -Nu ../vimrc
vim:
:Gita commit<C-c><C-a>
Error detected while processing function gita#content#autocmd[7]..gita#content#commit#autocmd[5]..<SNR>36_on_BufReadCmd[25]..gita#util#doautocmd:
line 25:
E518: Unknown option: commit
:wqDo you want to commit changes? (y[es]/n[o]): y<CR>
Summary (required)
When commit-message includes modeline specifier (
vim:
), Gita-commit-amend gets an error.Behavior (required)
Vim tries to treat commit-message
vim:
as modeline, therefore it causes E518 error.Minimal vimrc (required)
Procedure (required)
terminal:
vim:
:Gita commit
<C-c><C-a>
:wq
Do you want to commit changes? (y[es]/n[o]): y<CR>
Remarks
I think it is better to set
nomodeline
to commit-buffer.