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

Re: [PATCH 1/2] git-gui: warn if the commit message contains lines longer than the set limit

From
Birger Skogeng Pedersen <birger.sp@gmail.com>
Date
Sep 6, 2019, 14:08 UTC
Message-ID
<CAGr--=JpsgESv8W90-iT11VCAD3xQYipN3+Tt7cNyeZrsvhP_Q@mail.gmail.com>
In-Reply-To
<CAKPyHN1VeK4bR3Dn5yjrs2UwT5XGKOPU_FHaMBsP+riM-bjeWA@mail.gmail.com>
Hi Bert,

We should probably distinguish between what is wrapped in git-gui (i.e. purely visual), and what is actually wrapped in the commit message. I believe the former is referred to as "soft wrap", while the latter is "hard wrap".

On Thu, Sep 5, 2019 at 7:46 PM Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> Please exclude the first line, i.e., the subject. This should not be
> wrapped at all.

I think all lines should be soft wrapped. Scrolling sideways is just not something I'd want to do in the gui.

How about we soft wrap all lines (in gui). But when the commit is created, the actual hard wrap (newline characters) happens only on lines other than the first one?

But then again, the user might get frustrated when the resulting commit message looks different than what it appeared in git-gui.

Honestly I'd prefer just wrap the first line as well. If the user gets
frustrated that the first line gets wrapped there are two options:
- Refrain from writing such a long line
- Disable word wrapping (it should be configurable, like you said)
Thoughts?
Birger
Previous: Bert WesargNext: Philip Oakley
Message 12 of 21 in “git-gui: warn if the commit message contains lines longer than the set limit”
  1. 1/2 git-gui: warn if the commit message contains lines longer than the set limitBert Wesarg, Sep 4, 2019
  2. 2/2 git-gui: add horizontal scrollbar to commit bufferBert Wesarg, Sep 4, 2019
  3. Eric SunshineSep 4, 2019
  4. Bert WesargSep 4, 2019
  5. Pratyush YadavSep 10, 2019
  6. Bert WesargSep 12, 2019
  7. Eric SunshineSep 4, 2019
  8. Bert WesargSep 4, 2019
  9. Pratyush YadavSep 4, 2019
  10. Birger Skogeng PedersenSep 5, 2019
  11. Bert WesargSep 5, 2019
  12. Birger Skogeng PedersenSep 6, 2019
  13. Philip OakleySep 6, 2019
  14. David AguilarSep 10, 2019
  15. Pratyush YadavSep 10, 2019
  16. Johannes SixtSep 5, 2019
  17. Bert WesargSep 5, 2019
  18. Johannes SixtSep 10, 2019
  19. Bert WesargSep 12, 2019
  20. Pratyush YadavSep 10, 2019
  21. Bert WesargSep 12, 2019

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.