emacs-devel
[Top][All Lists]
Advanced

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

Re: New Git hooks for checking file names in commit messages


From: Jim Porter
Subject: Re: New Git hooks for checking file names in commit messages
Date: Sat, 22 Apr 2023 12:44:12 -0700

On 4/22/2023 12:51 AM, Eli Zaretskii wrote:
The programmatic expression of the standards is in add-log.el, I
think.

Thanks, that was helpful. From that, I see that you can list multiple files separated by commas and a space like so:

  * file1.txt, file2.txt

add-log.el's font-lock doesn't allow lists of files like that to span multiple lines, but I think it's reasonable to support that in the hooks. Everything else about the entries can span multiple lines, after all.

With add-log.el as a reference, I tightened up the Git hooks a bit so that they're stricter. They're still reasonably flexible though, e.g. it won't treat something like this as a file entry:

  * This is a bullet point.

That will help reduce false positives so that committers can format the description of their commit fairly freely. Hopefully this is a good balance: the hooks are stricter than authors.el, but not so strict that reasonable (IMO) messages will be rejected.

Attachment: 0001-Improve-the-logic-of-the-file-entry-Git-hooks-to-mat.patch
Description: Text document


reply via email to

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