progit / progit2

Pro Git 2nd Edition
Other
5.69k stars 1.88k forks source link

Using `git config --global core.editor "kate"` leads to "Aborting commit due to empty commit message" error #1893

Closed andrei-korshikov closed 10 months ago

andrei-korshikov commented 11 months ago

Checks: (Sorry, I created the issue with Reference in new issue in Code view, so I crafted this section manually.)

Steps to reproduce:

  1. Execute git config --global core.editor "kate" as written in Appendix C, core editor configuration commands
  2. Execute git commit. At this moment Kate is started, but git doesn't wait for Kate exiting, immediately complain with error Aborting commit due to empty commit message.

Solution: Use git config --global core.editor "kate --block" instead. Now git says hint: Waiting for your editor to close the file... and everything is working as expected.

Additional info: The same problem and the same solution proposed on LinuxQuestions.org.

ben commented 11 months ago

oooh, nice find. Want to submit a PR? I'd love for you to get git blame credit for fixing this.

andrei-korshikov commented 11 months ago

Want to submit a PR?

Ok, in a couple of days. Thank you for the opportunity to learn something new:)