title: git commit -a on Mac hangs when TextMate is quitted
body: <p>I have core.editor set to "mate -w". On Leopard, git commit -a starts TextMate. After entering a commit log message, saving (Cmd-S), and quitting (Cmd-Q) TextMate, git would successfully complete the commit operation using the entered commit log message.</p>
  
  <p>Since upgrading to Snow Leopard (Mac OS X 10.6.2), the behaviour has changed. After quitting TextMate, git commit hangs (consuming 0% CPU) and needs to be cancelled with Ctrl-C.</p>
  
  <p>The same happens if core-editor is not set and $EDITOR is set to "mate" or "mate -w".</p>
  
  <p>A workaround is to quit just the current TextMate window by hitting Ctrl-W rather than Ctrl-Q after saving the commit log message, but I'd like to understand the difference in behaviour (especially as my fingers are now trained with the Cmd-S Cmd-Q sequence) and get a fix as many other people are likely to run into this.</p>
  
  <p>The #git IRC channel (referenced on the <a href="http://git-scm.com/" rel="nofollow noreferrer">git home page</a>) was some help. They got me to set $GIT_TRACE to 1 which showed the following trace:</p>
  
  <pre><code>git commit -a
  trace: built-in: git 'commit' '-a'
  trace: run_command: 'sh' '-c' 'mate -w "$@"' 'mate -w' '.git/COMMIT_EDITMSG'
  ^C
  </code></pre>
  
  <p>(Also, on another Mac running Leopard in the past, git commit used to continue after I quitted TextMate, but then git would not find the commit log message and it would abort the commit. This seems to be a distinct problem, but it hints that the interaction between git commit and the editor is imperfect.)</p>