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

Re: Question about commit message wrapping

From
Sidney San Martín <s@sidneysm.com>
Date
Dec 9, 2011, 17:50 UTC
Message-ID
<E085218D-9287-4F82-B34C-8379742F818A@sidneysm.com>
In-Reply-To
<m3zkf1hnh9.fsf@localhost.localdomain>
On Dec 9, 2011, at 8:41 AM, Jakub Narebski wrote:
Show 12 quoted lines
> Sidney San Martín <s@sidneysm.com> writes:
> 
>> *Nothing else* in my everyday life works this way anymore. Line
>> wrapping gets done on the display end in my email client, my web
>> browser, my ebook reader entirely automatically, and it adapts to
>> the size of the window.
> 
> The problem with automatic wrapping on the display is that there could
> be parts of commit message that *shouldn't* be wrapped, like code
> sample, or URL... and in plain text you don't have a way to separate
> flowed from non-flowed part.
> 
I usually lead code, URLs, and other preformatted lines like this with a few spaces. Markdown uses the same convention, and it looks like commits in this repo do too.
The patch in my last email prints lines which begin with whitespace verbatim. How does that work?
> Also with long non-breakable identifiers you sometimes need to wrap by
> hand (or use linebreaking algorithm from TeX) or go bit over the limit
> to make it look nice.
> 
Could you elaborate on this? The patch uses strbuf_add_wrapped_text, which was already in Git. If an identifier is longer than the wrap width, it leaves it alone.
> BTW. proper editor used to create commit message can wrap it for you
> ;-).
Only if everybody else in the world does it too! And only if I never care about seeing my commits at any width besides 80 columns.
> -- 
> Jakub Narębski
> 
Previous: Jakub NarebskiNext: Jakub Narebski
Message 9 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.