You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git: Commit messages too long, allow configuring #1115
The automatic commit messages emitted by the git integration get pretty long -- by default, they're some variation on f"Did op foo on {describe(doc)}", which with the default document-description-format of {doc[title]} - {doc[author]} becomes pretty long.
In contrast, git conventions are to have commit subjects be capped at 50 chars, and commit bodies be wrapped at 72 chars.
For that purpose, a better template would be eg
{op} {format(ref-format, doc)}
{% for field in commit-fields %}
{{field | wordwrap(72)}}
{% endfor %}
An alternative workaround is to pass --edit to the calls to git commit, which would allow editing the commit message before the call.
A further alternative is to absorb the git commit failures, and then just papis git commit to write the commit message yourself.
Or I could disable commit message standards for that repo, but I'd like to keep things neat.
BTW, note that the fact that the commit message is controlled by document-description-format is not documented, and I needed to hunt it down in the code.
That sounds like a good idea, we should have some format specific for the git commit messages, since they're generally different to other "show user the operation being performed" log messages.
Or I could disable commit message standards for that repo, but I'd like to keep things neat.
I'm not sure what standards you have, but employing something like conventional commits is probably a bit out of scope. Also, for the default python formatter, it will be difficult to ensure it stays to a fixed number of chars without an additional config variable or something.
Or I could disable commit message standards for that repo, but I'd like to keep things neat.
I'm not sure what standards you have, but employing something like conventional commits[https://www.conventionalcommits.org/en/v1.0.0/] is probably a bit out of scope. Also, for the default python formatter, it will be difficult to ensure it stays to a fixed number of chars without an additional config variable or something.
Only looking for capping the subject and body line lengths. Subject line length is more important - it's visible in more contexts.
Probably the easiest solution here is to allow passing --edit to the git commit call.
We can recover automation somewhat in those circumstances by prepopulating the commit message (which can be made user configurable for further convenience). With both --edit and commit message configuration, we can leave satisfying message conventions to the user.
(BTW - the prepopulated commit message could contain some keys as comments, which could make composing easier)
Activity
alexfikl commentedon Dec 31, 2025
That sounds like a good idea, we should have some format specific for the git commit messages, since they're generally different to other "show user the operation being performed" log messages.
I'm not sure what standards you have, but employing something like conventional commits is probably a bit out of scope. Also, for the default python formatter, it will be difficult to ensure it stays to a fixed number of chars without an additional config variable or something.
hseg commentedon Dec 31, 2025