unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: Mistakes in commit log messages
Date: Thu, 13 Apr 2023 09:49:23 +0300	[thread overview]
Message-ID: <838rew5lak.fsf@gnu.org> (raw)
In-Reply-To: <48d4dffa-cfa8-7949-3043-a1efa937902d@gmail.com> (message from Jim Porter on Wed, 12 Apr 2023 23:18:37 -0700)

> 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.



  reply	other threads:[~2023-04-13  6:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <835ya5m4p0.fsf@gnu.org>
     [not found] ` <ZDPkykCsW3i30UR9@ACM>
     [not found]   ` <83v8i4arzt.fsf@gnu.org>
     [not found]     ` <CANh=_JF0CEPDsWZSuyy9ymByma2LxcypP90O3-LQ+KhoJ8cqvg@mail.gmail.com>
     [not found]       ` <CANh=_JEO4-E79dPCLc3cRLi7=ftAzc+H1FC46eck1vJN3TD3Sg@mail.gmail.com>
2023-04-11  6:02         ` Mistakes in commit log messages Eli Zaretskii
2023-04-11 14:01           ` Alan Mackenzie
2023-04-11 14:57             ` Eli Zaretskii
2023-04-11 17:20               ` Alan Mackenzie
2023-04-11 18:00                 ` Eli Zaretskii
2023-04-11 18:31             ` Jim Porter
2023-04-11 18:45               ` Eli Zaretskii
2023-04-11 19:27                 ` Jim Porter
2023-04-11 19:36                   ` Eli Zaretskii
2023-04-12  0:20                     ` Jim Porter
2023-04-13  6:18                       ` Jim Porter
2023-04-13  6:49                         ` Eli Zaretskii [this message]
2023-04-13  7:47                           ` Robert Pluim
2023-04-15  3:41                           ` Jim Porter
2023-04-15  5:45                             ` Jim Porter
2023-04-15  7:15                               ` Eli Zaretskii
2023-04-15 10:44                                 ` Alan Mackenzie
2023-04-15 11:00                                   ` Eli Zaretskii
2023-04-21 22:16                                   ` Filipp Gunbin
2023-04-15 20:54                               ` Jim Porter
2023-04-15 21:23                                 ` Jim Porter
2023-04-16  5:43                                   ` Eli Zaretskii
2023-04-16 20:06                                     ` Jim Porter
2023-04-16 20:19                                       ` Michael Albinus
2023-04-17  2:22                                       ` Eli Zaretskii
2023-04-17  7:28                                         ` Michael Albinus
2023-04-21  4:59                                 ` Jim Porter
2023-04-15  7:08                             ` Eli Zaretskii
2023-04-12  9:41                     ` Alan Mackenzie
2023-04-12 10:14                       ` Eli Zaretskii
2023-04-12  9:32               ` Alan Mackenzie

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=838rew5lak.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=jporterbugs@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).