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
subject_max_length counts git's fixup! prefix, so a fixup of a subject that fits is rejected #733
git commit --fixup <commit> is rejected with CC004 when the target's subject is within the limit, because git puts fixup! in front of it:
$ cat msg # the target's subject, 67 charactersfeat(parser): accept trailing commas in the argument list of a call
$ commit-check --message msg;echo$?0
$ cat fixup-msg # what `git commit --fixup` writes for itfixup! feat(parser): accept trailing commas in the argument list of a call
$ commit-check --message fixup-msg;echo$?✖ CC004 subject-max-length failed: fixup! feat(parser): accept trailing commas in the argument list of a call Subject is 74 characters; it must be at most 72 characters1
I expected it to pass: the prefix is git's, not the author's. Could a subject that starts with fixup! , squash! or amend! be measured without that prefix, the way the (#123) suffix is already left out of the count? amend! may need more than that: the line behind it is the subject being replaced, so a reword that shortens a subject over the limit would still be rejected.
Thank you for using commit-check and reporting the issue again.
You're right: that prefix from git should not count against the limit, just like Revert "..." already doesn't.
#734 makes skip subjects that start with git's exact fixup! , squash! or amend! prefix, so your amend! case is covered as well. It'll be in the next release very soon.
Activity
fix: do not judge the fixup!, squash! and amend! subjects git writes
shenxianpeng commentedon Nov 23, 2026
Hi @hajikelu
Thank you for using commit-check and reporting the issue again.
You're right: that prefix from git should not count against the limit, just like
Revert "..."already doesn't.#734 makes skip subjects that start with git's exact
fixup!,squash!oramend!prefix, so youramend!case is covered as well. It'll be in the next release very soon.