{"thread":{"id":"22308","subject":"git commit --cleanup and templates","startedAt":"2010-01-20T16:37:47Z","lastAt":"2010-01-27T11:48:20Z","messageCount":2,"participants":["Sebastian Schuberth","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132202","messageId":"hj7bh9$adp$1@ger.gmane.org","threadId":"22308","inReplyTo":null,"subject":"git commit --cleanup and templates","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2010-01-20T16:37:47Z","receivedAt":"2010-01-20T16:37:47Z","isPatch":false,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"Hi,\n\nwhen I recently for the first time used commit templates, I was \nsurprised to see that git by default strips leading empty lines that I \ndeliberately added to the template file when opening the template in the \neditor. I understand that I could use a different cleanup mode, but in \nfact I *want* git to clean everything, but only *after* I finished \nediting the commit message, not already when opening the editor.\n\nBefore submitting a patch, I'd like to hear what other people think \nabout this, or whether I'm overseeing something.\n\nThanks.\n\n-- \nSebastian Schuberth\n"},{"id":"132769","messageId":"20100127114820.GA12656@coredump.intra.peff.net","threadId":"22308","inReplyTo":"hj7bh9$adp$1@ger.gmane.org","subject":"Re: git commit --cleanup and templates","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-01-27T11:48:20Z","receivedAt":"2010-01-27T11:48:20Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 20, 2010 at 05:37:47PM +0100, Sebastian Schuberth wrote:\n\n> when I recently for the first time used commit templates, I was\n> surprised to see that git by default strips leading empty lines that\n> I deliberately added to the template file when opening the template\n> in the editor. I understand that I could use a different cleanup\n> mode, but in fact I *want* git to clean everything, but only *after*\n> I finished editing the commit message, not already when opening the\n> editor.\n> \n> Before submitting a patch, I'd like to hear what other people think\n> about this, or whether I'm overseeing something.\n\nNobody has responded, so I doubt anybody has strong objections (or maybe\nthey just didn't read your message. :) ).\n\nPersonally, the behavior you are proposing makes more sense to me, and I\ndon't think you will really be hurting anybody by changing it. You will\nnot affect the final commit message, but only what the user sees in\ntheir editor. And if people are really attached to not having extra\nwhitespace in the editor, then they can simply clean up their templates.\n\nSo I would suggest working on a patch if it is something you want.\n\n-Peff\n"}]}