Commit graph

4 commits

Author SHA1 Message Date
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Jim Porter
3ce462c8fd When examining merge commits in our Git hooks, only check the first parent
This does two things:

  1. We can properly validate log entries in merge commits.
  2. We don't check commits that were merged in from other branches.

* build-aux/git-hooks/commit-msg-files.awk (get_commit_changes): Get
the changes compared to the first parent.

* build-aux/git-hooks/pre-push: Only get the first parent of merge
commits when returning the rev-list, and only check "master" or
"emacs-NN" branches.
2023-04-23 12:07:08 -07:00
Jim Porter
9914de503b Improve the logic of the file entry Git hooks to support more cases
In addition to starting with a "*", file entries now need a ":"
somewhere in them.  This helps reduce false positives with bulleted
lists.  Also, support multiple files separated by commas after a "*".

* build-aux/git-hooks/commit-msg-files.awk (check_commit_msg_files):
Accumulate file entries over multiple lines to support the above.
2023-04-23 12:07:08 -07:00
Jim Porter
4416262f59 Add Git hooks to check filenames listed in the commit message
See <https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00274.html>.

* build-aux/git-hooks/commit-msg-files.awk:
* build-aux/git-hooks/post-commit:
* build-aux/git-hooks/pre-push: New files...
* autogen.sh: ... add them.
2023-04-20 21:40:02 -07:00