{"thread":{"id":"31997","subject":"Overlong lines with git-merge --log","startedAt":"2012-11-02T01:30:15Z","lastAt":"2012-11-02T13:49:33Z","messageCount":4,"participants":["Tim Janik","Jeff King","Stephen Bash"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202385","messageId":"50932227.3090401@gnu.org","threadId":"31997","inReplyTo":null,"subject":"Overlong lines with git-merge --log","fromName":"Tim Janik","fromEmail":"timj@gnu.org","sentAt":"2012-11-02T01:30:15Z","receivedAt":"2012-11-02T01:30:15Z","isPatch":false,"sender":{"key":"timj@gnu.org","avatar":"https://gravatar.com/avatar/39101f5de4621a229041610bafefba04998848e7817d7152acfddfc8c5ea0058?d=mp&s=160"},"body":"Hey all.\n\nUsing git-merge --log to merge commit messages that spawn multiple lines\nwill produce overlong summary lines.\nThat's because each summary line for a commit includes the entire commit\nmessage (all lines concatenated).\n\nAccording to git-fmt-merge-msg(1), --log should 'populate the log\nmessage with one-line descriptions' instead of using the entire commit\nmessages.\nWhich would make a lot of sense, it's just not working as advertised.\n\nEncountered with git version 1.7.9.5.\n\n-- \nYours sincerely,\nTim Janik\n\n---\nhttp://timj.testbit.eu/ - Free software Author\n"},{"id":"202407","messageId":"20121102100519.GC30221@sigill.intra.peff.net","threadId":"31997","inReplyTo":"50932227.3090401@gnu.org","subject":"Re: Overlong lines with git-merge --log","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-11-02T10:05:19Z","receivedAt":"2012-11-02T10:05:19Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 02, 2012 at 02:30:15AM +0100, Tim Janik wrote:\n\n> Using git-merge --log to merge commit messages that spawn multiple lines\n> will produce overlong summary lines.\n> That's because each summary line for a commit includes the entire commit\n> message (all lines concatenated).\n> \n> According to git-fmt-merge-msg(1), --log should 'populate the log\n> message with one-line descriptions' instead of using the entire commit\n> messages.\n> Which would make a lot of sense, it's just not working as advertised.\n\nThe \"subject\" or \"first line\" is not actually the first line; these days\nit is typically the \"first paragraph\". The reason is that git always\nexpected commit messages to look like:\n\n  one line describing the change\n\n  more detailed explanation\n  that might go on for several lines\n\n  or even several paragraphs\n\nHowever, as people imported commits from previous systems, they ended up\nwith a lot of commit messages where the closest thing to a subject was\nsplit across several lines like:\n\n  here's a description of the commit that is probably overly long,\n  but that's how we did it back in CVS days\n\nTaking just the first line of those often cuts off the useful part. It\nwas deemed less bad to show the whole message as a subject rather than\ncut it off arbitrarily.\n\nIf you are developing with git and not splitting the subject out with a\nblank line, there are a lot of tools that are going to look ugly (e.g.,\nformat-patch will generate overly long subjects, \"log --oneline\" will be\nugly, and browsers like \"tig\" and \"gitk\" may be overwhelmed).\n\n-Peff\n"},{"id":"202420","messageId":"5093C98D.90807@gnu.org","threadId":"31997","inReplyTo":"20121102100519.GC30221@sigill.intra.peff.net","subject":"Re: Overlong lines with git-merge --log","fromName":"Tim Janik","fromEmail":"timj@gnu.org","sentAt":"2012-11-02T13:24:29Z","receivedAt":"2012-11-02T13:24:29Z","isPatch":false,"sender":{"key":"timj@gnu.org","avatar":"https://gravatar.com/avatar/39101f5de4621a229041610bafefba04998848e7817d7152acfddfc8c5ea0058?d=mp&s=160"},"body":"On 02.11.2012 11:05, Jeff King wrote:\n\n> Taking just the first line of those often cuts off the useful part. It\n> was deemed less bad to show the whole message as a subject rather than\n> cut it off arbitrarily.\n\nThanks a lot for the explanation, I'm using git directly here, but the\ntwo cases I had indeed lacked this newline.\n\n-- \nYours sincerely,\nTim Janik\n\n---\nhttp://timj.testbit.eu/ - Free software Author\n"},{"id":"202421","messageId":"982632649.556351.1351864173516.JavaMail.root@genarts.com","threadId":"31997","inReplyTo":"5093C98D.90807@gnu.org","subject":"Re: Overlong lines with git-merge --log","fromName":"Stephen Bash","fromEmail":"bash@genarts.com","sentAt":"2012-11-02T13:49:33Z","receivedAt":"2012-11-02T13:49:33Z","isPatch":false,"sender":{"key":"bash@genarts.com","avatar":null},"body":"----- Original Message -----\n> From: \"Tim Janik\" <timj@gnu.org>\n> Sent: Friday, November 2, 2012 9:24:29 AM\n> Subject: Re: Overlong lines with git-merge --log\n> \n> On 02.11.2012 11:05, Jeff King wrote:\n> \n> > Taking just the first line of those often cuts off the useful part.\n> > It was deemed less bad to show the whole message as a subject rather\n> > than cut it off arbitrarily.\n> \n> Thanks a lot for the explanation, I'm using git directly here, but the\n> two cases I had indeed lacked this newline.\n\nFWIW we use merge --log quite extensively here at the office, and I've developed a habit to skim the extremely long lines and attempt to cut them intelligently (something I don't trust the computer to do for me).  Sometimes that means taking the second or third sentence if it's a better summary, sometimes it's just abbreviating the first.  Now that merge automatically spawns an editor, this is quite convenient (though it does take a bit longer).\n\nThanks,\nStephen\n"}]}