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

Re: [PATCH] Automatically line wrap long commit messages.

From
Shawn Pearce <spearce@spearce.org>
Date
May 29, 2006, 09:14 UTC
Message-ID
<20060529091423.GD29500@spearce.org>
In-Reply-To
<20060529090045.GW13513@lug-owl.de>
Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
Show 7 quoted lines
> On Mon, 2006-05-29 04:57:39 -0400, Shawn Pearce <spearce@spearce.org> wrote:
> > When using -m on the command line with git-commit it is not uncommon
> > for a long commit message to be entered without line terminators.
> > This creates commit objects whose messages are not readable in
> > 'git log' as the line runs off the screen.
> 
> Uh? Just put it in quotes and press the Enter key when applicable.

I realize that. But I feel that it looks rather ugly on the command line, in the resulting message, and is difficult to do well all of the time.

For one thing the first line is offset due to the stuff preeceding it on the command line, even if you put the -m" on the next line. For another it goes nicely with my prior patch of allowing multiple -m flags on the command line and merging them into a single commit message by treating each option argument as its own paragraph.

Maybe its just me but I've generally found `fmt` does a nice job of line wrapping my text. I'm writing this email out in vi with no thought to line wrapping and will let `fmt` clean it all up for me before I sent it. I do the same thing with all of my commit messages; except git-commit won't let me do it from the command line.

This patch was trying to do that... but I suspected some folks would not like the idea very much. :-)

-- 
Shawn.
Previous: Jan-Benedict GlawNext: Junio C Hamano
Message 3 of 10 in “Automatically line wrap long commit messages.”
  1. Automatically line wrap long commit messages.Shawn Pearce, May 29, 2006
  2. Jan-Benedict GlawMay 29, 2006
  3. Shawn PearceMay 29, 2006
  4. Junio C HamanoMay 29, 2006
  5. Shawn PearceMay 29, 2006
  6. Junio C HamanoMay 30, 2006
  7. Shawn PearceMay 31, 2006
  8. Junio C HamanoMay 31, 2006
  9. Shawn PearceJun 1, 2006
  10. Junio C HamanoJun 1, 2006

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.