Re: Wrap commit messages on `git commit -m`
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Nov 3, 2012, 18:51 UTC
- Message-ID
- <CABURp0qbX53=bnVDYNmsSixiL+G6B0dg2o8=HR-J4JNanndROw@mail.gmail.com>
- In-Reply-To
- <CAJDDKr4ta2Xu5zO6yASSNewZXxu=LWuNO0zU8YnSP4Kq9ZJn-g@mail.gmail.com>
On Sat, Nov 3, 2012 at 3:41 AM, David Aguilar <davvid@gmail.com> wrote:
Show 30 quoted lines
> On Fri, Nov 2, 2012 at 11:38 PM, Jonathan Nieder <jrnieder@gmail.com> wrote: >> Ramkumar Ramachandra wrote: >>> Jonathan Nieder wrote: >> >>>> Ram, what platform do your colleagues use? >>> >>> Red Hat Enterprise Linux 5. >> >> Oh, ok. In that case I blame habit. >> >> I think the best option you have is to just complain to your >> colleagues about the long lines. Then they would get a chance to >> explore what the UI currently offers and to complain to this list >> (perhaps via you :)) about missing features that would make their work >> easier. >> >> To put it another way: I don't see yet how a hypothetical "git commit >> --wrap-lines -m 'long message'" would make life easier than just >> running "git commit" and entering the message using $EDITOR. There's >> probably a UI or documentation bug lurking somewhere, so thanks for >> thinking about these things. >> >> Regards, >> Jonathan > > If your colleagues do not mind using a GUI then git-cola > might help them form better commit messages. > > It auto-wraps long lines and enforces a very clear distinction > between the one-line summary and extended description.
vim also does this nicely with syntax highlighting turned on, though I do not know how this feature is triggered.
Specifically, it wraps all lines at 72 characters; it colors line 1 yellow out to 50 characters and white after that; and it colors any text on line 2 with a red background (should be empty).
Phil