[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mistakes in commit log messages
From: |
Eli Zaretskii |
Subject: |
Re: Mistakes in commit log messages |
Date: |
Thu, 13 Apr 2023 09:49:23 +0300 |
> Date: Wed, 12 Apr 2023 23:18:37 -0700
> From: Jim Porter <jporterbugs@gmail.com>
> Cc: acm@muc.de, emacs-devel@gnu.org
>
> On 4/11/2023 5:20 PM, Jim Porter wrote:
> > If we did something like this, I think both post-commit and pre-push
> > hooks would be useful. The former gives committers immediate feedback on
> > their commit message (if they read the output), while the latter is what
> > ensures that the upstream commit messages are properly-formatted.
>
> Attached is a mostly-working pair of hooks (post-commit and pre-push) to
> check this. There's still a bit more work to do though:
>
> 1. Clean up the output a bit
> 2. Make it work on non-gawk awks
Please be sure to test the part that finds the file names on all the
log messages in the repository. The things people do in logs will
sometimes surprise you. In particular, a '*' after leading whitespace
doesn't necessarily flag a file name, see, for example, the following
commits:
92d75e5c53241ac76e8fdcb6fc66ade68354687c
0bd96806ef1a0f0d2d3f48cdb1204b7e393ab036
eff42dc0af741cc56c52d7d9577d29fc16f9f665
b5f70c239e87e5f38fd70181ef75cd28a43a8b41
Also, it looks like your script doesn't recognize file names in a line
that starts with a semi-colon, as in this commit:
commit 74ddfe811f980122816ba831bea18ca18afedb85
Author: Eli Zaretskii <eliz@gnu.org>
AuthorDate: Sat Apr 8 19:14:15 2023 +0300
Commit: Eli Zaretskii <eliz@gnu.org>
CommitDate: Sat Apr 8 19:14:15 2023 +0300
; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (bug#62658).
> In commit 89f2dbb773: My commit message
> File lisp/bad.el listed in commit message, but not in diff
What about the opposite: a file is mentioned in the diff, but not in
the commit message? Or maybe that is allowed, and we shouldn't block
it?
Thanks.
- Re: Mistakes in commit log messages, (continued)
- Re: Mistakes in commit log messages, Alan Mackenzie, 2023/04/11
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/11
- Re: Mistakes in commit log messages, Eli Zaretskii, 2023/04/11
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/11
- Re: Mistakes in commit log messages, Eli Zaretskii, 2023/04/11
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/11
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/13
- Re: Mistakes in commit log messages,
Eli Zaretskii <=
- Re: Mistakes in commit log messages, Robert Pluim, 2023/04/13
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/14
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/15
- Re: Mistakes in commit log messages, Eli Zaretskii, 2023/04/15
- Re: Mistakes in commit log messages, Alan Mackenzie, 2023/04/15
- Re: Mistakes in commit log messages, Eli Zaretskii, 2023/04/15
- Re: Mistakes in commit log messages, Filipp Gunbin, 2023/04/21
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/15
- Re: Mistakes in commit log messages, Jim Porter, 2023/04/15
- Re: Mistakes in commit log messages, Eli Zaretskii, 2023/04/16