From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Mistakes in commit log messages Date: Thu, 13 Apr 2023 09:49:23 +0300 Message-ID: <838rew5lak.fsf@gnu.org> References: <835ya5m4p0.fsf@gnu.org> <83v8i4arzt.fsf@gnu.org> <838rezardu.fsf@gnu.org> <319d616d-9230-0a82-331f-0f57488e4c80@gmail.com> <834jpm9s1g.fsf@gnu.org> <83v8i28b3j.fsf@gnu.org> <693285d2-e50b-289d-4f3e-ddd817ddc75b@gmail.com> <48d4dffa-cfa8-7949-3043-a1efa937902d@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4482"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 13 08:49:32 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pmqlv-0000vC-8y for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Apr 2023 08:49:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmql6-0001g1-4l; Thu, 13 Apr 2023 02:48:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmql4-0001ft-RY for emacs-devel@gnu.org; Thu, 13 Apr 2023 02:48:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmql3-0001Zq-TJ; Thu, 13 Apr 2023 02:48:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Gnz8IB2Yv1sq3dZaONv1201RKrQmrfnzhzCulLuWpOg=; b=alcIGQNTfBRb H9LBoaLD5O35ZSLVdU1dVgLv7YLRjEK0MV5ai6+Oo9JR+kbQnTYHWiCeQSquSKCK9k4q46PpZ18B2 TQ3TaW+UqU7YYVNH19zFCrI3DgFCfzUpbkDM/FlDFxzy3DofTP4qTRk5o4JESUM5cxkmmfBjrSKdd YG8amc45vO7rlrOkveAkvjovosZowh/AFVqFpTh84q19dkomoSpc/JfPsYjm/TzMiN0i4vSY+yzkS kPDxwoEPGdKrKJH/Xpp74MagdADrfvDzzuJahobinovX/ZPD4OlcXlWCgSlXXLAAF9rrN3ZNy0IQJ RNuC58EX2H0xJV8zC+HzZw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmql2-0003oF-R8; Thu, 13 Apr 2023 02:48:37 -0400 In-Reply-To: <48d4dffa-cfa8-7949-3043-a1efa937902d@gmail.com> (message from Jim Porter on Wed, 12 Apr 2023 23:18:37 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305280 Archived-At: > Date: Wed, 12 Apr 2023 23:18:37 -0700 > From: Jim Porter > 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 AuthorDate: Sat Apr 8 19:14:15 2023 +0300 Commit: Eli Zaretskii 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.