Git commit fails with Vim and GVim

Viewed 10736

When I try to do a git commit -a, I get a nice vim instance. I type in my message, do :wq, vim closes down and the terminal has the message,

Aborting commit due to empty commit message.

Pursuant to this question I made sure my core.editor says "gvim" (so does the user.editor, fwiw), but I still get that error message.

Does anyone have another idea?

Edit 1: I am able to commit by specifying a file. My messages are too long to reasonably use the -m option.

Edit 2:

$ git config core.editor
vim
error: More than one value for the key core.editor: vim
error: More than one value for the key core.editor: gvim

Edit 3: Still having the same problem, even with core.editor sorted. Any other ideas?

$ git config core.editor
gvim -f

$ git commit
Aborting commit due to empty commit message.

Edit 4: Other error messages. This is everything I'm seeing. I excluded several from my original question because I've gotten them on many machines, none of which had problems using vim/gvim with git (except the current one). In the case shown here, core.editor is set to vim -f.

$ git commit

(gvim:21655): GLib-WARNING **: g_set_prgname() called multiple times

** (gvim:21655): CRITICAL **: gtk_form_set_static_gravity: assertion `static_gravity_supported' failed

** (gvim:21655): CRITICAL **: gtk_form_set_static_gravity: assertion `static_gravity_supported' failed

** (gvim:21655): CRITICAL **: gtk_form_set_static_gravity: assertion `static_gravity_supported' failed

** (gvim:21655): CRITICAL **: gtk_form_set_static_gravity: assertion `static_gravity_supported' failed

** (gvim:21655): CRITICAL **: gtk_form_set_static_gravity: assertion `static_gravity_supported' failed
Aborting commit due to empty commit message.

When core.editor is set to gvim -f I get exactly the same error messages except the number is 21641, not 21655. When I Google one of the lines, I get no matches (I find that hard to believe, but there you are).

5 Answers
Related