emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mistakes in commit log messages


From: Alan Mackenzie
Subject: Re: Mistakes in commit log messages
Date: Wed, 12 Apr 2023 09:41:29 +0000

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 <jporterbugs@gmail.com>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]