all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: john@yates-sheets.org, emacs-devel@gnu.org
Subject: Re: New Git hooks for checking file names in commit messages
Date: Fri, 21 Apr 2023 23:59:33 -0700	[thread overview]
Message-ID: <19cf70fa-22fc-213b-e2d3-610f8e6cc165@gmail.com> (raw)
In-Reply-To: <83pm7w30pg.fsf@gnu.org>

On 4/21/2023 11:11 PM, Eli Zaretskii wrote:
>> Date: Fri, 21 Apr 2023 10:44:10 -0700
>> From: Jim Porter <jporterbugs@gmail.com>
>> Cc: emacs-devel@gnu.org, eliz@gnu.org
>>
>> Eli, what do you think? I've run this against the 5000 latest commits
>> and the results look right (though I haven't looked as thoroughly as
>> last time).
> 
> I think the hooks should follow the GNU Standards (which are also our
> conventions), not their particular expressions in algorithms used by
> authors.el.

I *think* in this case, the two are the same... or at least the relevant 
algorithms in authors.el are consistent with the GNU standards. I don't 
see a strict set of rules in the GNU standards, so I had to make some 
guesses based on the examples and the implementation in authors.el. This 
is what I used:

1. A file entry is introduced by a line starting with "*" or ";[ \t]+*" 
(this is slightly different from authors.el; indenting the "*" will make 
it not count as a file entry for the purposes of the hooks)

2. A file entry must also contain a ":" before the next blank line

3. A file entry's list of files starts after the leading "*" and 
continues up until the first ":", "(", "[", or "<"

4. Each file in a list of files is split by spaces, and possibly a comma 
(specifically ",?[ \t]+")[1]

5. You can continue long file names over multiple lines if necessary

I think the first 3 are all consistent with the spirit of the GNU 
standards as well as all the provided examples. The 4th rule is more 
questionable; maybe we should be stricter about this one, but I saw that 
style a dozen or so times in looking through the commit history, and 
authors.el is ok with it. The last rule only comes up rarely, but it's 
useful for deeply-nested files (mostly test resources).

[1] Note: I tweaked this since the patch I posted. That's the only 
change though.



  reply	other threads:[~2023-04-22  6:59 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  4:55 New Git hooks for checking file names in commit messages Jim Porter
2023-04-21 12:05 ` John Yates
2023-04-21 16:44   ` Jim Porter
2023-04-21 17:44     ` Jim Porter
2023-04-22  6:11       ` Eli Zaretskii
2023-04-22  6:59         ` Jim Porter [this message]
2023-04-22  7:51           ` Eli Zaretskii
2023-04-22 19:44             ` Jim Porter
2023-04-22 23:21               ` John Yates
2023-04-21 13:57 ` Alan Mackenzie
2023-04-21 15:05   ` Eli Zaretskii
2023-04-21 15:38     ` Arsen Arsenović
2023-04-21 15:50       ` Eli Zaretskii
2023-04-21 16:20         ` Arsen Arsenović
2023-04-21 17:44           ` Eli Zaretskii
2023-04-21 17:50             ` Arsen Arsenović
2023-04-22  6:16               ` Eli Zaretskii
2023-04-21 18:25             ` Andreas Schwab
2023-04-21 19:03         ` Björn Bidar
2023-04-21 19:53           ` Jim Porter
2023-04-22  7:03           ` Eli Zaretskii
2023-04-22 19:52             ` Jim Porter
2023-04-23  6:11               ` Eli Zaretskii
2023-04-23  7:07                 ` Jim Porter
2023-04-23  7:37                   ` Eli Zaretskii
2023-04-23 19:15                     ` Jim Porter
2023-04-23 19:24                       ` Eli Zaretskii
2023-04-23  7:19                 ` Jim Porter
2023-04-23  7:39                   ` Eli Zaretskii
2023-04-23  9:51                     ` Björn Bidar
2023-04-22 23:55     ` Dmitry Gutov
2023-04-23  5:36       ` Eli Zaretskii
2023-04-23  9:47       ` Björn Bidar
2023-04-21 16:39   ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19cf70fa-22fc-213b-e2d3-610f8e6cc165@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=john@yates-sheets.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.