{"thread":{"id":"23134","subject":"commit --amend neglecting return value","startedAt":"2010-03-22T04:36:16Z","lastAt":"2010-03-22T18:39:56Z","messageCount":4,"participants":["maximilian attems","Brian Gernhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137516","messageId":"20100322043616.GF21406@baikonur.stro.at","threadId":"23134","inReplyTo":null,"subject":"commit --amend neglecting return value","fromName":"maximilian attems","fromEmail":"max@stro.at","sentAt":"2010-03-22T04:36:16Z","receivedAt":"2010-03-22T04:36:16Z","isPatch":false,"sender":{"key":"max@stro.at","avatar":"https://avatars.githubusercontent.com/u/1266461?v=4"},"body":"hello,\n\nbug is easily reproducible by\n\n> foo\ngit add foo\ngit commit --amend\n:q!\n 1 files changed, 1 insertions(+), 8 deletions(-)\n create mode 100644 test\n\ngit --version\n git version 1.7.0.2\n\naboves is usage with vim as patch editor.\nThe expected behaviour would be to have not foo add to repo.\nafair this feature^Wbug exists since loooong.\n\nthanks + kind regards\n\n-- \nmaks\n"},{"id":"137517","messageId":"196847A3-42CB-4CE8-8FFC-D7C8C8AFCDF7@gernhardtsoftware.com","threadId":"23134","inReplyTo":"20100322043616.GF21406@baikonur.stro.at","subject":"Re: commit --amend neglecting return value","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-03-22T05:16:55Z","receivedAt":"2010-03-22T05:16:55Z","isPatch":false,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn Mar 22, 2010, at 12:36 AM, maximilian attems wrote:\n\n> bug is easily reproducible by\n> \n>> foo\n> git add foo\n> git commit --amend\n> :q!\n> 1 files changed, 1 insertions(+), 8 deletions(-)\n> create mode 100644 test\n> \n> git --version\n> git version 1.7.0.2\n> \n> aboves is usage with vim as patch editor.\n> The expected behaviour would be to have not foo add to repo.\n> afair this feature^Wbug exists since loooong.\n\nVim returns 0 even if quit with :q!.  Killing vim from another terminal causes this:\n\n--- 8< ---\nVim: Caught deadly signal TERM\n\nVim: Finished.\nerror: /Users/brian/bin/vim died of signal 15\nerror: There was a problem with the editor '/Users/brian/bin/vim'.\nPlease supply the message using either -m or -F option.\n--- 8< ---\n\nIf 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.\"\n\n~~ Brian"},{"id":"137518","messageId":"E139EF92-B047-4928-A390-D47224CAA3DB@gernhardtsoftware.com","threadId":"23134","inReplyTo":"196847A3-42CB-4CE8-8FFC-D7C8C8AFCDF7@gernhardtsoftware.com","subject":"Re: commit --amend neglecting return value","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-03-22T05:20:20Z","receivedAt":"2010-03-22T05:20:20Z","isPatch":false,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn Mar 22, 2010, at 1:16 AM, Brian Gernhardt wrote:\n\n> 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.\"\n\nOops.  Obviously I meant \"ggdG:wq^M\".\n\nAlso, a quick search of :help and testing reveals that \":cq\" causes Vim to exit with non-zero status which will cause git to abort the commit.\n\n~~ Brian\n"},{"id":"137598","messageId":"20100322183956.GC21299@stro.at","threadId":"23134","inReplyTo":"E139EF92-B047-4928-A390-D47224CAA3DB@gernhardtsoftware.com","subject":"Re: commit --amend neglecting return value","fromName":"maximilian attems","fromEmail":"max@stro.at","sentAt":"2010-03-22T18:39:56Z","receivedAt":"2010-03-22T18:39:56Z","isPatch":false,"sender":{"key":"max@stro.at","avatar":"https://avatars.githubusercontent.com/u/1266461?v=4"},"body":"On Mon, 22 Mar 2010, Brian Gernhardt wrote:\n\n> \n> On Mar 22, 2010, at 1:16 AM, Brian Gernhardt wrote:\n> \n> > 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.\"\n> \n> Oops.  Obviously I meant \"ggdG:wq^M\".\n> \n> Also, a quick search of :help and testing reveals that \":cq\" causes Vim to exit with non-zero status which will cause git to abort the commit.\n\nthanks for the pointer this is indeed very helpful. :)\n\nkept hiting that bug in stressy situations, good to know a way out.\n"}]}