A common git style rule says that commit messages should be at most 50 characters long and commit descriptions at most 72.

Can magit truncate the lines in the COMMIT_EDITMSG buffer in accordance with those rules? That is, truncate once the line exceeds 50 characters if it is the message line or 72 characters if it is the description line.

  • Magit uses git-commit mode for messages. Check if git-commit-summary-max-length goes in this direction.
    – Juancho
    Mar 8, 2021 at 13:48
  • Thank you! I set that variable to 50 and used auto-fill-mode with fill-column set to 72. That behavior is not the one I asked for but I actually prefer it. I'm unsure whether I should leave the question open anyway. Mar 8, 2021 at 14:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.