Repository navigation
Description
Describe the bug
With default config git.commit.autoWrapCommitMessage and autoWrapWidth: 72
a long co-author is formatted incorrectly. This causes the trailer to be invalid.
✅ Correct (39 characters)
Co-authored-by: John Doe <john@doe.com>
When a co-author is a long string .e.g, John Doe <xxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyyy.com>
❌ Wrong (74 characters)
Co-authored-by: John Doe
<xxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyyy.com>
As per https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#updating-gocui
I edited gocui in the lazygit/vendor for testing, but raising an issue to see if I should continue this to the gocui repo?
To Reproduce
Steps to reproduce the behavior:
git:
commit:
autoWrapCommitMessage: true
autoWrapWidth: 72- Go to the Commit summary
- Commit Menu
- Add co-author
- Input a long
Name <Email>.e.g,John Doe <xxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyyy.com> - See Commit description displays an invalid
Co-authored-bykey
Expected behavior
Option A: correctly format a trailer with a leading space
Co-authored-by: John Doe
<xxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyyy.com>
Option B: skip formatting of trailers
Co-authored-by: John Doe <xxxxxxxxxxxxxxxxxxxxxxxx@yyyyyyyyyyyyyyyyyy.com>
This option is most similar to skipping the formatting of footnotes, e.g.,[1]: https://www.example.com
- Prevent auto-wrapping for commit trailers #4900
- Don't break line after footnote symbol in auto-wrapped TextArea gocui#85
Screenshots
demo repo with 3 commits: https://github.com/sogladev/coauthor-test/commits/main/
Version info:
discovered on
commit=, build date=, build source=unknown, version=0.58.0, os=linux, arch=amd64, git version=2.52.0
confirmed on 19605ad
Terminal info:
konsole 25.12.1
Additional context
https://git-scm.com/docs/git-interpret-trailers
When reading trailers, there can be no whitespace before or inside the <key>, but any number of regular space and tab characters are allowed between the <key> and the separator. There can be whitespaces before, inside or after the <value>. The <value> may be split over multiple lines with each subsequent line starting with at least one whitespace, like the "folding" in RFC 822. Example:
key: This is a very long value, with spaces and
newlines in it.
Activity
stefanhaller commentedon Jan 19, 2026
Thanks. A few thoughts:
That documentation is slightly out of date (there no longer is an
awesomebranch in gocui), but apart from that the recommendation still holds: open a PR here, changing the files in the vendor directory, and worry about making a gocui PR only once we're done reviewing it here.Exclude commit trailers from line wrapping (#5230)