{"thread":{"id":"31994","subject":"Wrap commit messages on `git commit -m`","startedAt":"2012-11-01T16:07:00Z","lastAt":"2012-11-04T07:27:05Z","messageCount":11,"participants":["Ramkumar Ramachandra","Thomas Adam","James Nylen","Lars Gullik Bjønnes","Kevin","Jonathan Nieder","David Aguilar","Phil Hord","Tay Ray Chuan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202371","messageId":"CALkWK0kQ+qCsOa87yY4wma279mp+9h+LFv3qCP_qrNdDyGNcsQ@mail.gmail.com","threadId":"31994","inReplyTo":null,"subject":"Wrap commit messages on `git commit -m`","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-01T16:07:00Z","receivedAt":"2012-11-01T16:07:00Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nSome of my colleagues are lazy to fire up an editor and write proper\ncommit messages- they often write one-liners using `git commit -m`.\nHowever, that line turns out to be longer than 72 characters, and the\nresulting `git log` output is ugly.  So, I was wondering if it would\nbe a good idea to wrap these one-liners to 72 characters\nautomatically.\n\nThanks.\n\nRam\n"},{"id":"202380","messageId":"m3a9v170ca.fsf@black.gullik.net","threadId":"31994","inReplyTo":"CALkWK0kQ+qCsOa87yY4wma279mp+9h+LFv3qCP_qrNdDyGNcsQ@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Lars Gullik Bjønnes","fromEmail":"larsbj@gullik.org","sentAt":"2012-11-01T16:29:56Z","receivedAt":"2012-11-01T16:29:56Z","isPatch":false,"sender":{"key":"larsbj@gullik.org","avatar":"https://avatars.githubusercontent.com/u/15680184?v=4"},"body":"Ramkumar Ramachandra <artagnon@gmail.com> writes:\n\n| Hi,\n>\n| Some of my colleagues are lazy to fire up an editor and write proper\n| commit messages- they often write one-liners using `git commit -m`.\n| However, that line turns out to be longer than 72 characters, and the\n| resulting `git log` output is ugly.  So, I was wondering if it would\n| be a good idea to wrap these one-liners to 72 characters\n| automatically.\n\ngit commit -m 'foo: fix this problem\n\nThis problem is fixed by doing foo,\nbar and baz.\n\nSigned-off-by: me\n'\n\nworks.\n\n-- \n\tLgb\n"},{"id":"202373","messageId":"CA+39Oz7iuSPh2DqQFoO9o+V3TouMUy8T00KgXEP0vY758=S5gA@mail.gmail.com","threadId":"31994","inReplyTo":"CALkWK0kQ+qCsOa87yY4wma279mp+9h+LFv3qCP_qrNdDyGNcsQ@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Thomas Adam","fromEmail":"thomas@xteddy.org","sentAt":"2012-11-01T18:12:22Z","receivedAt":"2012-11-01T18:12:22Z","isPatch":false,"sender":{"key":"thomas@xteddy.org","avatar":"https://gravatar.com/avatar/e7256db4738e501e5d2e84f00bb0bd99503165729573848a03330301fc2adc4a?d=mp&s=160"},"body":"Hi,\n\nOn 1 November 2012 16:07, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>\n> Hi,\n>\n> Some of my colleagues are lazy to fire up an editor and write proper\n> commit messages- they often write one-liners using `git commit -m`.\n> However, that line turns out to be longer than 72 characters, and the\n> resulting `git log` output is ugly.  So, I was wondering if it would\n> be a good idea to wrap these one-liners to 72 characters\n> automatically.\n\nCan't you do this already?  From \"git-log(1)\":\n\n %w([<w>[,<i1>[,<i2>]]]): switch line wrapping, like the -w\noption of git-shortlog(1).\n\n-- Thomas Adam\n"},{"id":"202378","messageId":"CABVa4Nh_-XD2m4HkPjWBaY8ReJVMbzfn-MC6i-vY-o35xCZUHA@mail.gmail.com","threadId":"31994","inReplyTo":"CA+39Oz7iuSPh2DqQFoO9o+V3TouMUy8T00KgXEP0vY758=S5gA@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"James Nylen","fromEmail":"jnylen@gmail.com","sentAt":"2012-11-01T21:10:08Z","receivedAt":"2012-11-01T21:10:08Z","isPatch":false,"sender":{"key":"jnylen@gmail.com","avatar":"https://gravatar.com/avatar/96804ac655933f5b6380e992610d6ff9029c6d04db1042d4bec381312ff7ff1b?d=mp&s=160"},"body":"On Thu, Nov 1, 2012 at 2:12 PM, Thomas Adam <thomas@xteddy.org> wrote:\n> Hi,\n>\n> On 1 November 2012 16:07, Ramkumar Ramachandra <artagnon@gmail.com> wrote:\n>>\n>> Hi,\n>>\n>> Some of my colleagues are lazy to fire up an editor and write proper\n>> commit messages- they often write one-liners using `git commit -m`.\n>> However, that line turns out to be longer than 72 characters, and the\n>> resulting `git log` output is ugly.  So, I was wondering if it would\n>> be a good idea to wrap these one-liners to 72 characters\n>> automatically.\n>\n> Can't you do this already?  From \"git-log(1)\":\n>\n\nI think he's talking about git-commit wrapping the message as it is\nbeing committed, instead of git-log doing the wrapping as it is being\ndisplayed.\n\nI personally would rather see git-commit refuse to accept messages\nwider than 72 characters.\n"},{"id":"202381","messageId":"CAO54GHDRBDyQYvo-g_xEvsQJRgtfbbT-4-kop8hoSK1D37G44w@mail.gmail.com","threadId":"31994","inReplyTo":"m3a9v170ca.fsf@black.gullik.net","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Kevin","fromEmail":"ikke@ikke.info","sentAt":"2012-11-01T21:52:09Z","receivedAt":"2012-11-01T21:52:09Z","isPatch":false,"sender":{"key":"ikke@ikke.info","avatar":"https://gravatar.com/avatar/60a0d08eeccb16914fdbfc7f3441548dc827dc436d5c6900ec6600e274e53c5b?d=mp&s=160"},"body":"As I see it, the problem is not the possibility to add new lines, but\ncolleagues being too lazy to add them.\n\nOn Thu, Nov 1, 2012 at 5:29 PM, Lars Gullik Bjønnes <larsbj@gullik.org> wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n> | Hi,\n>>\n> | Some of my colleagues are lazy to fire up an editor and write proper\n> | commit messages- they often write one-liners using `git commit -m`.\n> | However, that line turns out to be longer than 72 characters, and the\n> | resulting `git log` output is ugly.  So, I was wondering if it would\n> | be a good idea to wrap these one-liners to 72 characters\n> | automatically.\n>\n> git commit -m 'foo: fix this problem\n>\n> This problem is fixed by doing foo,\n> bar and baz.\n>\n> Signed-off-by: me\n> '\n>\n> works.\n>\n> --\n>         Lgb\n>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"202383","messageId":"20121101221203.GE6213@elie.Belkin","threadId":"31994","inReplyTo":"CAO54GHDRBDyQYvo-g_xEvsQJRgtfbbT-4-kop8hoSK1D37G44w@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-11-01T22:12:03Z","receivedAt":"2012-11-01T22:12:03Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Kevin wrote:\n\n> As I see it, the problem is not the possibility to add new lines, but\n> colleagues being too lazy to add them.\n\nI suspect the underlying problem is that we make it too hard to tell\ngit which text editor to run.\n\nRam, what platform do your colleagues use?\n\nThanks,\nJonathan\n"},{"id":"202457","messageId":"CALkWK0n3nvu4neica==bXaGCtDish8cfUhcsmJT0w3ihrq6coA@mail.gmail.com","threadId":"31994","inReplyTo":"20121101221203.GE6213@elie.Belkin","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-02T19:37:22Z","receivedAt":"2012-11-02T19:37:22Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Jonathan Nieder wrote:\n> Kevin wrote:\n>\n>> As I see it, the problem is not the possibility to add new lines, but\n>> colleagues being too lazy to add them.\n>\n> I suspect the underlying problem is that we make it too hard to tell\n> git which text editor to run.\n\nDon't we just use $EDITOR?\n\n> Ram, what platform do your colleagues use?\n\nRed Hat Enterprise Linux 5.\n\nRam\n"},{"id":"202463","messageId":"20121103063855.GA8326@elie.Belkin","threadId":"31994","inReplyTo":"CALkWK0n3nvu4neica==bXaGCtDish8cfUhcsmJT0w3ihrq6coA@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2012-11-03T06:38:56Z","receivedAt":"2012-11-03T06:38:56Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ramkumar Ramachandra wrote:\n> Jonathan Nieder wrote:\n\n>> Ram, what platform do your colleagues use?\n>\n> Red Hat Enterprise Linux 5.\n\nOh, ok.  In that case I blame habit.\n\nI think the best option you have is to just complain to your\ncolleagues about the long lines.  Then they would get a chance to\nexplore what the UI currently offers and to complain to this list\n(perhaps via you :)) about missing features that would make their work\neasier.\n\nTo put it another way: I don't see yet how a hypothetical \"git commit\n--wrap-lines -m 'long message'\" would make life easier than just\nrunning \"git commit\" and entering the message using $EDITOR.  There's\nprobably a UI or documentation bug lurking somewhere, so thanks for\nthinking about these things.\n\nRegards,\nJonathan\n"},{"id":"202464","messageId":"CAJDDKr4ta2Xu5zO6yASSNewZXxu=LWuNO0zU8YnSP4Kq9ZJn-g@mail.gmail.com","threadId":"31994","inReplyTo":"20121103063855.GA8326@elie.Belkin","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2012-11-03T07:41:49Z","receivedAt":"2012-11-03T07:41:49Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Fri, Nov 2, 2012 at 11:38 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Ramkumar Ramachandra wrote:\n>> Jonathan Nieder wrote:\n>\n>>> Ram, what platform do your colleagues use?\n>>\n>> Red Hat Enterprise Linux 5.\n>\n> Oh, ok.  In that case I blame habit.\n>\n> I think the best option you have is to just complain to your\n> colleagues about the long lines.  Then they would get a chance to\n> explore what the UI currently offers and to complain to this list\n> (perhaps via you :)) about missing features that would make their work\n> easier.\n>\n> To put it another way: I don't see yet how a hypothetical \"git commit\n> --wrap-lines -m 'long message'\" would make life easier than just\n> running \"git commit\" and entering the message using $EDITOR.  There's\n> probably a UI or documentation bug lurking somewhere, so thanks for\n> thinking about these things.\n>\n> Regards,\n> Jonathan\n\nIf your colleagues do not mind using a GUI then git-cola\nmight help them form better commit messages.\n\nIt auto-wraps long lines and enforces a very clear distinction\nbetween the one-line summary and extended description.\n-- \nDavid\n"},{"id":"202468","messageId":"CABURp0qbX53=bnVDYNmsSixiL+G6B0dg2o8=HR-J4JNanndROw@mail.gmail.com","threadId":"31994","inReplyTo":"CAJDDKr4ta2Xu5zO6yASSNewZXxu=LWuNO0zU8YnSP4Kq9ZJn-g@mail.gmail.com","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2012-11-03T18:51:02Z","receivedAt":"2012-11-03T18:51:02Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sat, Nov 3, 2012 at 3:41 AM, David Aguilar <davvid@gmail.com> wrote:\n> On Fri, Nov 2, 2012 at 11:38 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n>> Ramkumar Ramachandra wrote:\n>>> Jonathan Nieder wrote:\n>>\n>>>> Ram, what platform do your colleagues use?\n>>>\n>>> Red Hat Enterprise Linux 5.\n>>\n>> Oh, ok.  In that case I blame habit.\n>>\n>> I think the best option you have is to just complain to your\n>> colleagues about the long lines.  Then they would get a chance to\n>> explore what the UI currently offers and to complain to this list\n>> (perhaps via you :)) about missing features that would make their work\n>> easier.\n>>\n>> To put it another way: I don't see yet how a hypothetical \"git commit\n>> --wrap-lines -m 'long message'\" would make life easier than just\n>> running \"git commit\" and entering the message using $EDITOR.  There's\n>> probably a UI or documentation bug lurking somewhere, so thanks for\n>> thinking about these things.\n>>\n>> Regards,\n>> Jonathan\n>\n> If your colleagues do not mind using a GUI then git-cola\n> might help them form better commit messages.\n>\n> It auto-wraps long lines and enforces a very clear distinction\n> between the one-line summary and extended description.\n\nvim also does this nicely with syntax highlighting turned on, though I\ndo not know how this feature is triggered.\n\nSpecifically, it wraps all lines at 72 characters; it colors line 1\nyellow out to 50 characters and white after that; and it colors any\ntext on line 2 with a red background (should be empty).\n\nPhil\n"},{"id":"202507","messageId":"CALUzUxrdCw6nPLzeLHij+CjHsPO3w=e0nUdjBL=P7rqJtZ+t3A@mail.gmail.com","threadId":"31994","inReplyTo":"m3a9v170ca.fsf@black.gullik.net","subject":"Re: Wrap commit messages on `git commit -m`","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2012-11-04T07:27:05Z","receivedAt":"2012-11-04T07:27:05Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"On Thu, Nov 1, 2012 at 11:29 AM, Lars Gullik Bjønnes <larsbj@gullik.org> wrote:\n> Ramkumar Ramachandra <artagnon@gmail.com> writes:\n>\n> | Hi,\n>>\n> | Some of my colleagues are lazy to fire up an editor and write proper\n> | commit messages- they often write one-liners using `git commit -m`.\n> | However, that line turns out to be longer than 72 characters, and the\n> | resulting `git log` output is ugly.  So, I was wondering if it would\n> | be a good idea to wrap these one-liners to 72 characters\n> | automatically.\n>\n> git commit -m 'foo: fix this problem\n>\n> This problem is fixed by doing foo,\n> bar and baz.\n>\n> Signed-off-by: me\n> '\n>\n> works.\n\nPerhaps a deeper issue is that the implicit email format\n(subject-body) for commit messages, is, well, implicit. New users of\ngit who type git-commit -m '...' isn't going to know that those few\ncharacters will all be lumped on a \"subject\" line, forever screwing\nthemselves when they review the output of git-log, git-rebase\n--interactive, etc. (can't remember off the top of my head if\ngit-format-patch would chop off long subjects and move it to the\nbody), which may be a significant period of time (and thus commits)\nlater.\n\nWhile I don't have any ideas on how to improve on this, hopefully this\ngets recognized as an issue in the first place.\n\n-- \nCheers,\nRay Chuan\n"}]}