Re: commit --amend neglecting return value
- From
Brian Gernhardt <brian@gernhardtsoftware.com>
- Date
- Mar 22, 2010, 05:16 UTC
- Message-ID
- <196847A3-42CB-4CE8-8FFC-D7C8C8AFCDF7@gernhardtsoftware.com>
- In-Reply-To
- <20100322043616.GF21406@baikonur.stro.at>
On Mar 22, 2010, at 12:36 AM, maximilian attems wrote:
Show 15 quoted lines
> bug is easily reproducible by > >> foo > git add foo > git commit --amend > :q! > 1 files changed, 1 insertions(+), 8 deletions(-) > create mode 100644 test > > git --version > git version 1.7.0.2 > > aboves is usage with vim as patch editor. > The expected behaviour would be to have not foo add to repo. > afair this feature^Wbug exists since loooong.
Vim returns 0 even if quit with :q!. Killing vim from another terminal causes this:
--- 8< --- Vim: Caught deadly signal TERM
Vim: Finished. error: /Users/brian/bin/vim died of signal 15 error: There was a problem with the editor '/Users/brian/bin/vim'. Please supply the message using either -m or -F option. --- 8< ---
If you want to abort committing while editing the message, delete the entire message (in Vim: "0dG:wq^M") and git will reply "Aborting commit due to empty commit message."
~~ Brian