tags:

views:

72

answers:

3

EDIT: I'm using pico now for git messages, so I won't really need the solution anymore. But if you have suggestions, out of curiousity, I can try them.

So I've got a git repository on cygwin, and doing 'git commit -a -m "message"' works just fine.

However, doing 'git commit', which goes to an emacs window, and typing something in, and hitting C-x C-s and C-x C-c (save and quit) does not perform the commit (as verified by 'git log').

Any ideas?

A: 

Does git print anything in the console?

At a guess: your emacs is returning an error to git, so git aborts the commit.

Kristof Provost
Doesn't look like git prints anything.I get "C-x C-g is undefined" in emacs (which I'm guessing is unrelated to the problem) after hitting C-x C-c, and it just exits to the console.
azala
A: 

I think Cygwin doesn't treat C-c the way you'd expect, unless you put "set CYGWIN=tty" into cygwin.bat.

See http://cygwin.com/cygwin-ug-net/using-cygwinenv.html for meager details.

offby1
A: 

Before doing your git commit be sure to have something like this :

export GIT_EDITOR=emacsclient
Jérôme Radix