git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: David AguilarNext: Tay Ray Chuan
Message 8 of 11 in “Wrap commit messages on `git commit -m`”
  1. Ramkumar RamachandraNov 1, 2012
  2. Lars Gullik BjønnesNov 1, 2012
  3. KevinNov 1, 2012
  4. Jonathan NiederNov 1, 2012
  5. Ramkumar RamachandraNov 2, 2012
  6. Jonathan NiederNov 3, 2012
  7. David AguilarNov 3, 2012
  8. Phil HordNov 3, 2012
  9. Tay Ray ChuanNov 4, 2012
  10. Thomas AdamNov 1, 2012
  11. James NylenNov 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.