From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Mistakes in commit log messages Date: Wed, 12 Apr 2023 09:41:29 +0000 Message-ID: References: <83v8i4arzt.fsf@gnu.org> <838rezardu.fsf@gnu.org> <319d616d-9230-0a82-331f-0f57488e4c80@gmail.com> <834jpm9s1g.fsf@gnu.org> <83v8i28b3j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 12 11:42:07 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 1pmWzP-00019w-KD for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Apr 2023 11:42:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmWyz-0003zS-AM; Wed, 12 Apr 2023 05:41:41 -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 1pmWyt-0003wv-4V for emacs-devel@gnu.org; Wed, 12 Apr 2023 05:41:35 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmWyr-0000Qz-4H for emacs-devel@gnu.org; Wed, 12 Apr 2023 05:41:34 -0400 Original-Received: (qmail 22003 invoked by uid 3782); 12 Apr 2023 11:41:30 +0200 Original-Received: from acm.muc.de (pd953ab03.dip0.t-ipconnect.de [217.83.171.3]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 12 Apr 2023 11:41:30 +0200 Original-Received: (qmail 13957 invoked by uid 1000); 12 Apr 2023 09:41:29 -0000 Content-Disposition: inline In-Reply-To: <83v8i28b3j.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:305266 Archived-At: Hello, Eli. On Tue, Apr 11, 2023 at 22:36:48 +0300, Eli Zaretskii wrote: > > Date: Tue, 11 Apr 2023 12:27:40 -0700 > > Cc: acm@muc.de, emacs-devel@gnu.org > > From: Jim Porter > > One issue with the current implementation (mentioned elsewhere in this > > thread) is that it doesn't work for deleting a file from the repo. > > Fixing this in the commit-msg hook is tricky. We can get the list of > > changed files via "git diff --name-only" (and then we could compare our > > commit message against that list), but there's a problem: I don't know > > of a good way to detect when the user is amending a commit[1]. For a > > normal commit, you'd get the changed files via something like "git diff > > --staged --name-only", but for an amended commit, you'd want to add > > "HEAD^" to that command. > If this will cry wolf on every removal or rename of a file, then this > cure is worse than the disease, IMNSHO. I'd prefer to waste a few > hours of my time when preparing the tarball than risk annoying > everyone with such false positives. OK, so checking the existence of files isn't a good way to tackle the problem. Jim's got some good ideas for an alternative. Coming back to the other part of the problem, what exactly happened when you ran `authors'? When I tried it yesterday, apart from me not having the locale en_US.UTF-8, it ran to completion, producing the output and a list of missing files together with their "authors". What am I missing? [ .... ] -- Alan Mackenzie (Nuremberg, Germany).