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

Re: Wrap commit messages on `git commit -m`

From
James Nylen <jnylen@gmail.com>
Date
Nov 1, 2012, 21:10 UTC
Message-ID
<CABVa4Nh_-XD2m4HkPjWBaY8ReJVMbzfn-MC6i-vY-o35xCZUHA@mail.gmail.com>
In-Reply-To
<CA+39Oz7iuSPh2DqQFoO9o+V3TouMUy8T00KgXEP0vY758=S5gA@mail.gmail.com>
On Thu, Nov 1, 2012 at 2:12 PM, Thomas Adam <thomas@xteddy.org> wrote:
Show 15 quoted lines
> Hi,
>
> On 1 November 2012 16:07, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
>>
>> Hi,
>>
>> Some of my colleagues are lazy to fire up an editor and write proper
>> commit messages- they often write one-liners using `git commit -m`.
>> However, that line turns out to be longer than 72 characters, and the
>> resulting `git log` output is ugly.  So, I was wondering if it would
>> be a good idea to wrap these one-liners to 72 characters
>> automatically.
>
> Can't you do this already?  From "git-log(1)":
>

I think he's talking about git-commit wrapping the message as it is being committed, instead of git-log doing the wrapping as it is being displayed.

I personally would rather see git-commit refuse to accept messages wider than 72 characters.

Previous: Thomas Adam
Message 11 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.