Search code examples
gitemacsegg

egg git interface for emacs, commit message empty


I'm using egg (emacs got git) as git interface in emacs. Whenever I try to achieve a commit --amend, I receive a "GIT-COMMIT-AMEND> Aborting commit due to empty commit message".

This is what i do:

C-u C-x v c

Then the commit buffer appears, with the message of my previous commit.

Then upon C-c C-c I get the message stated above: empty commit message.

I think I've had this behaviour with regular commits (as in not amend) before, but can't remember or find how I solved it.

I tried editing the message (adding a space somewhere). No work.

I tried saving the buffer before committing, that wouldn't work either (since C-c C-c is not active in another buffer than the commit buffer).

Any clue?


Solution

  • Problem solved, although I do not quite understand.

    I had to change some options for egg. It didn't seem to have the correct string to find git.exe in some cases.

    What I did:

    M-x customize-group <RET> egg <RET>
    

    then changing Egg git command to git.exe including its full path worked.

    This is a bit strange since:

    • egg could use git to generate the status buffer
    • the path to git is in my path envvar
    • the message "Aborting commit..." comes from git, I believe.

    After learning how to debug elisp, I found that the markers supposed to show the limits of the commit message were both nil in the function egg-log-msg-commit.

    At other places, these markers hold the character indexes for the commit message, but not there.