emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding git-commit highlight mode?


From: Stefan Kangas
Subject: Re: Adding git-commit highlight mode?
Date: Thu, 2 Jan 2025 15:53:29 -0600

Arsen Arsenović <arsen@aarsen.me> writes:

> A thing that a git commit mode ought to do, however, is set fill-column
> to 72, highlight any content on line 2 as erroneous, and limit the first
> line to 50 characters.  This is conventional in Git:
> https://git-scm.com/docs/git-commit#_discussion
> https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project.html#_commit_guidelines

I agree with the 72 character fill-column, and have in the past
suggested using that for ChangeLog's also.  (There was recently a
decision to reduce the fill-column even further instead.)

AFAICT, the 50 character line limit for the summary line is not really
followed very strictly in practice by most projects, including the Linux
kernel.  It's more of a recommendation.  Even the link you provide above
says that it's "a good idea" to use "no more than 50 characters" for it.
For that reason, I think that this should be a warning (with a highlight
if you go over), and not a hard limit.

In `git-commit-mode`, the user option `git-commit-summary-max-length' is
68 by default, which strikes me as unopinionated enough.

> As far as I know, some of these guidelines conflict with changelog
> guidelines.

They are not fundamentally incompatible, AFAIU.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]