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

Re: Question about commit message wrapping

From
HHHolger Hellmuth <hellmuth@ira.uka.de>
Date
Dec 13, 2011, 13:14 UTC
Message-ID
<4EE74FA9.2020908@ira.uka.de>
In-Reply-To
<4EE6C31C.60909@alum.mit.edu>
On 13.12.2011 04:14, Michael Haggerty wrote:
> On 12/12/2011 11:16 PM, Frans Klaver wrote:
>> Wrapped code as in auto-wrapped? Or as in manually wrapped? Python
>> programmers have significant white space, but you can still hard wrap
>> stuff, as long as the next statement is properly indented.

I meant as in auto-wrapped and also not as a permanent change but something done to a long line on output to the screen.

> FWIW I think automatic wrapping of commit messages is a bad idea.  I
> wrap my commit messages deliberately to make them look the way I want

Which you still can do (since hard line endings would not be ignored). On displays wider than your line limit you will still see it exactly like intended. Only on narrow displays your commit message would look bad, admittedly even worse than cut-off lines.

Show 8 quoted lines
> them to look.  The assumption of an 80-character display has historical
> reasons, but it is also a relatively comfortable line-width to read
> (even on wider displays).  And given that commit messages sometimes
> contain "flowable" paragraph text, sometimes code snippets, sometimes
> ASCII art, etc, no automatic wrapping will work correctly unless
> everybody agrees that commit messages must be written in some specific
> form of markup (or lightweight markup).  And I can't imagine such a
> thing ever happening.

With that assumption everyone could be happy with automatic wrapping of lines on screen output. You can hard wrap and it will look exactly as intended. In the same commit message you could also just write a paragraph without hitting the return-key at all and have a commit message that looks good in web browsers and too narrow gitk windows.

Previous: Frans KlaverNext: Sidney San Martín
Message 17 of 21 in “Question about commit message wrapping”
  1. Sidney San MartínDec 9, 2011
  2. Frans KlaverDec 9, 2011
  3. Frans KlaverDec 9, 2011
  4. Sidney San MartínDec 9, 2011
  5. Frans KlaverDec 9, 2011
  6. Sidney San MartínDec 9, 2011
  7. Andreas SchwabDec 10, 2011
  8. Jakub NarebskiDec 9, 2011
  9. Sidney San MartínDec 9, 2011
  10. Jakub NarebskiDec 10, 2011
  11. Andrew ArdillDec 11, 2011
  12. Frans KlaverDec 12, 2011
  13. Holger HellmuthDec 12, 2011
  14. Frans KlaverDec 12, 2011
  15. Michael HaggertyDec 13, 2011
  16. Frans KlaverDec 13, 2011
  17. Holger HellmuthDec 13, 2011
  18. Sidney San MartínDec 14, 2011
  19. Drew NorthupJan 1, 2012
  20. Sidney San MartínJan 26, 2012
  21. Sidney San MartínDec 14, 2011

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.